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:
2026-03-28 03:58:43 +01:00
parent 2f95dcc076
commit 0402e0fdbe
25 changed files with 799 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
package infra
import (
"fmt"
"os/exec"
"strings"
)
// DockerStartContainer inicia un contenedor existente por nombre o ID.
func DockerStartContainer(nameOrID string) error {
out, err := exec.Command("docker", "start", nameOrID).CombinedOutput()
if err != nil {
return fmt.Errorf("docker start %s: %s", nameOrID, strings.TrimSpace(string(out)))
}
return nil
}