--- name: docker_remove_image kind: function lang: go domain: infra version: "1.0.0" purity: impure signature: "func DockerRemoveImage(image string, force bool) error" description: "Elimina una imagen Docker local. Con force=true fuerza la eliminación incluso si hay contenedores que la usan." tags: [docker, image, remove, infra] uses_functions: [] uses_types: [] returns: [] returns_optional: false error_type: "error_go_core" imports: [fmt, os/exec, strings] params: - name: image desc: "referencia de imagen Docker (nombre:tag o ID)" - name: force desc: "si true fuerza eliminacion incluso si hay contenedores usando la imagen" output: "nil si se elimino exitosamente, error en caso contrario" tested: false tests: [] test_file_path: "" file_path: "functions/infra/docker_remove_image.go" --- ## Ejemplo ```go err := DockerRemoveImage("nginx:latest", false) if err != nil { log.Fatal(err) } ```