179 lines
4.2 KiB
JSON
179 lines
4.2 KiB
JSON
{
|
|
"module": "docker",
|
|
"version": "1",
|
|
"capabilities": [
|
|
"package-manager",
|
|
"service-manager",
|
|
"privileged"
|
|
],
|
|
"invokes": [
|
|
"seat:mesh-controller.images"
|
|
],
|
|
"claims": [
|
|
{
|
|
"name": "node-container-runtime",
|
|
"scope": "node"
|
|
}
|
|
],
|
|
"tools": [
|
|
"docker_list",
|
|
"docker_inspect",
|
|
"docker_resolv_conf",
|
|
"docker_logs",
|
|
"docker_secrets_in_logs",
|
|
"docker_secrets_in_events",
|
|
"docker_stats",
|
|
"docker_start",
|
|
"docker_stop",
|
|
"docker_restart",
|
|
"docker_top",
|
|
"docker_images",
|
|
"docker_prune",
|
|
"docker_prune_images",
|
|
"docker_disk_usage",
|
|
"docker_networks",
|
|
"docker_volumes",
|
|
"docker_events",
|
|
"docker_daemon_config",
|
|
"docker_unlabelled",
|
|
"docker_problems",
|
|
"docker_ports"
|
|
],
|
|
"replaces": {
|
|
"docker_resolv_conf": [
|
|
"docker exec cat /etc/resolv.conf"
|
|
]
|
|
},
|
|
"config": {
|
|
"log-max-size": {
|
|
"type": "string",
|
|
"description": "The size each container's log is cut at, a whole number from 1 with k, m or g after it; the runtime keeps log-max-file of them, so 100m and 10 hold about 1 GB per container (novox/hq issue 452). The runtime reads it only at its next start, which the mesh never forces, and a container created before that keeps the options it was created with until it is created again.",
|
|
"pattern": "[1-9][0-9]*[kmg]",
|
|
"trusted": true,
|
|
"default": "100m"
|
|
},
|
|
"log-max-file": {
|
|
"type": "number",
|
|
"description": "How many of a container's log files of log-max-size the runtime keeps, a count from 1 to 99, the oldest dropped first; taken at the runtime's next start and by containers created after it, like log-max-size (novox/hq issue 452).",
|
|
"minimum": 1,
|
|
"maximum": 99,
|
|
"trusted": true,
|
|
"default": 10
|
|
}
|
|
},
|
|
"resources": [
|
|
{
|
|
"id": "package",
|
|
"type": "package",
|
|
"package": "docker"
|
|
},
|
|
{
|
|
"id": "buildx",
|
|
"type": "package",
|
|
"package": "docker-buildx"
|
|
},
|
|
{
|
|
"id": "socket",
|
|
"type": "service",
|
|
"unit": "docker.socket",
|
|
"state": "running",
|
|
"boot": "enabled"
|
|
},
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"place": "mesh"
|
|
},
|
|
{
|
|
"id": "log-rotation",
|
|
"type": "file",
|
|
"path": "${dir:state}/log-rotation.conf",
|
|
"mode": "0600",
|
|
"trusted": true,
|
|
"template": "files/log-rotation.conf"
|
|
},
|
|
{
|
|
"id": "log-rotation-check",
|
|
"type": "process",
|
|
"name": "docker-log-rotation-check",
|
|
"artifact": "tools",
|
|
"run": [
|
|
"./docker-tools",
|
|
"check-log-rotation"
|
|
],
|
|
"run-once": true,
|
|
"env": {
|
|
"DOCKER_LOG_ROTATION": "${dir:state}/log-rotation.conf"
|
|
},
|
|
"restart-on": [
|
|
"log-rotation"
|
|
]
|
|
},
|
|
{
|
|
"id": "daemon",
|
|
"type": "file",
|
|
"path": "/etc/docker/daemon.json",
|
|
"mode": "0644",
|
|
"into": "json",
|
|
"trusted": true,
|
|
"template": "files/daemon.json"
|
|
},
|
|
{
|
|
"id": "runtime",
|
|
"type": "service",
|
|
"unit": "docker.service",
|
|
"state": "running",
|
|
"boot": "enabled",
|
|
"reload-on": [
|
|
"daemon"
|
|
]
|
|
},
|
|
{
|
|
"id": "prune-service",
|
|
"type": "file",
|
|
"path": "/etc/systemd/system/docker-prune.service",
|
|
"mode": "0644",
|
|
"template": "files/docker-prune.service"
|
|
},
|
|
{
|
|
"id": "prune-timer",
|
|
"type": "file",
|
|
"path": "/etc/systemd/system/docker-prune.timer",
|
|
"mode": "0644",
|
|
"template": "files/docker-prune.timer"
|
|
},
|
|
{
|
|
"id": "prune",
|
|
"type": "service",
|
|
"unit": "docker-prune.timer",
|
|
"state": "running",
|
|
"boot": "enabled",
|
|
"restart-on": [
|
|
"prune-service",
|
|
"prune-timer"
|
|
]
|
|
}
|
|
],
|
|
"build": {
|
|
"artifacts": [
|
|
{
|
|
"name": "tools",
|
|
"kind": "bundle",
|
|
"language": "go",
|
|
"system": "arch",
|
|
"from": "cmd/docker-tools",
|
|
"binary": "docker-tools",
|
|
"loads": [
|
|
"docker-tools"
|
|
]
|
|
},
|
|
{
|
|
"name": "files",
|
|
"kind": "archive",
|
|
"from": "files"
|
|
}
|
|
]
|
|
}
|
|
}
|