0402e0fdbe
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.
32 lines
756 B
Markdown
32 lines
756 B
Markdown
---
|
|
name: docker_remove_container
|
|
kind: function
|
|
lang: go
|
|
domain: infra
|
|
version: "1.0.0"
|
|
purity: impure
|
|
signature: "func DockerRemoveContainer(nameOrID string, force bool) error"
|
|
description: "Elimina un contenedor Docker. Con force=true puede eliminar contenedores en ejecución (equivale a docker rm -f)."
|
|
tags: [docker, container, remove, infra]
|
|
uses_functions: []
|
|
uses_types: []
|
|
returns: []
|
|
returns_optional: false
|
|
error_type: "error_go_core"
|
|
imports: [fmt, os/exec, strings]
|
|
tested: false
|
|
tests: []
|
|
test_file_path: ""
|
|
file_path: "functions/infra/docker_remove_container.go"
|
|
---
|
|
|
|
## Ejemplo
|
|
|
|
```go
|
|
// Eliminar contenedor detenido
|
|
err := DockerRemoveContainer("old-app", false)
|
|
|
|
// Forzar eliminación
|
|
err = DockerRemoveContainer("stuck-app", true)
|
|
```
|