如何在马拉松部署文件中设置 docker 命令 --log.level=DEBUG?
How to set docker command --log.level=DEBUG in a marathon deployment file?
正在阅读此 docker-compose
文件:(来源:https://docs.traefik.io/user-guides/docker-compose/acme-dns/#setup)
version: "3.3"
services:
traefik:
image: "traefik:v2.1.0"
container_name: "traefik"
command:
- "--log.level=DEBUG"
如何在此 marathon 部署文件中设置 --log.level=DEBUG
命令:
{
"id": "/whoami",
"cpus": 0.1,
"mem": 256.0,
"instances": 1,
"container": {
"type": "DOCKER",
"docker": {
"image": "traefik:v2.1.0",
"network": "BRIDGE",
"portMappings": [
{
"containerPort": 80,
"protocol": "tcp"
}
]
}
}
}
我认为您只需要将 "args": ["--log.level=DEBUG"]
添加到您的 JSON。
{
"id": "/whoami",
"cpus": 0.1,
"mem": 256.0,
"instances": 1,
"args": ["--log.level=DEBUG"],
"container": {
"type": "DOCKER",
"docker": {
"image": "traefik:v2.1.0",
"network": "BRIDGE",
"portMappings": [
{
"containerPort": 80,
"protocol": "tcp"
}
]
}
}
}
正在阅读此 docker-compose
文件:(来源:https://docs.traefik.io/user-guides/docker-compose/acme-dns/#setup)
version: "3.3"
services:
traefik:
image: "traefik:v2.1.0"
container_name: "traefik"
command:
- "--log.level=DEBUG"
如何在此 marathon 部署文件中设置 --log.level=DEBUG
命令:
{
"id": "/whoami",
"cpus": 0.1,
"mem": 256.0,
"instances": 1,
"container": {
"type": "DOCKER",
"docker": {
"image": "traefik:v2.1.0",
"network": "BRIDGE",
"portMappings": [
{
"containerPort": 80,
"protocol": "tcp"
}
]
}
}
}
我认为您只需要将 "args": ["--log.level=DEBUG"]
添加到您的 JSON。
{
"id": "/whoami",
"cpus": 0.1,
"mem": 256.0,
"instances": 1,
"args": ["--log.level=DEBUG"],
"container": {
"type": "DOCKER",
"docker": {
"image": "traefik:v2.1.0",
"network": "BRIDGE",
"portMappings": [
{
"containerPort": 80,
"protocol": "tcp"
}
]
}
}
}