feat: docker_create_network y docker_remove_network en infra

Funciones para crear y eliminar redes Docker. DockerCreateNetwork
usa bridge como driver por defecto. Necesarias para pipelines que
orquestan múltiples contenedores en red compartida.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-28 17:13:45 +01:00
parent 9ba1f86c34
commit 79a2a21c5e
4 changed files with 103 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
---
name: docker_create_network
kind: function
lang: go
domain: infra
version: "1.0.0"
purity: impure
signature: "func DockerCreateNetwork(name, driver string) (string, error)"
description: "Crea una red Docker con el nombre y driver dados. Si driver está vacío usa bridge por defecto. Devuelve el ID de la red creada."
tags: [docker, network, create, 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_create_network.go"
---
## Ejemplo
```go
netID, err := DockerCreateNetwork("my-app-net", "bridge")
if err != nil {
log.Fatal(err)
}
fmt.Println("Network ID:", netID)
```