1d45f232c6
Funciones impuras para gestión de contenedores: docker_build_image, docker_compose_up/down, docker_volume_create/list/remove, generate_dockerfile, write_dockerfile, go_build_binary, health_check_http, deploy_app y stop_app. Todas con tests unitarios donde aplica. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.1 KiB
1.1 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, tested, tests, test_file_path, file_path
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | tested | tests | test_file_path | file_path | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| docker_compose_up | function | go | infra | 1.0.0 | impure | func DockerComposeUp(composeFile string, detach bool) (string, error) | Levanta un stack docker-compose desde el archivo dado. Si detach es true ejecuta en background (-d). Retorna el stdout del comando. |
|
false | error_go_core |
|
true |
|
functions/infra/docker_compose_up_test.go | functions/infra/docker_compose_up.go |
Ejemplo
out, err := DockerComposeUp("./docker-compose.yml", true)
if err != nil {
log.Fatal(err)
}
fmt.Println(out)
Notas
Ejecuta docker compose -f composeFile up [-d]. Usa el subcomando docker compose (V2), no el binario standalone docker-compose. Retorna stdout + stderr combinados para facilitar el debugging. En modo no-detach bloquea hasta que el compose termine (util para stacks efimeros).