feat: 10 funciones infra Docker y 2 tipos — operaciones de contenedores e imagenes
Funciones Docker: list/start/stop/remove containers, list/pull/remove images, inspect, logs, run. Tipos: ContainerInfo e ImageInfo. Pre-existentes en el dominio infra, ahora registrados.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
---
|
||||
name: docker_list_images
|
||||
kind: function
|
||||
lang: go
|
||||
domain: infra
|
||||
version: "1.0.0"
|
||||
purity: impure
|
||||
signature: "func DockerListImages() ([]ImageInfo, error)"
|
||||
description: "Lista las imágenes Docker disponibles localmente. Parsea la salida JSON de docker images."
|
||||
tags: [docker, image, list, infra]
|
||||
uses_functions: []
|
||||
uses_types: [image_info_go_infra]
|
||||
returns: [image_info_go_infra]
|
||||
returns_optional: false
|
||||
error_type: "error_go_core"
|
||||
imports: [encoding/json, fmt, os/exec]
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
file_path: "functions/infra/docker_list_images.go"
|
||||
---
|
||||
|
||||
## Ejemplo
|
||||
|
||||
```go
|
||||
images, err := DockerListImages()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
for _, img := range images {
|
||||
fmt.Printf("%s:%s (%s)\n", img.Repository, img.Tag, img.Size)
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user