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.
741 B
741 B
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_container_logs | function | go | infra | 1.0.0 | impure | func DockerContainerLogs(nameOrID string, tail int) (string, error) | Obtiene los logs de un contenedor Docker. El parámetro tail limita a las últimas N líneas (0 devuelve todos los logs). |
|
false | error_go_core |
|
false | functions/infra/docker_container_logs.go |
Ejemplo
// Últimas 100 líneas
logs, err := DockerContainerLogs("my-app", 100)
if err != nil {
log.Fatal(err)
}
fmt.Println(logs)