公告
财富商城
积分规则
提问
发文
2019-05-10 17:35发布
smile是对你的礼貌
When running docker in swarm mode, a history of past tasks accumulate as docker services are updated. Running docker node ps displays the log of tasks.
docker node ps
How do I clear this log without removing the service?
You can adjust the history limit in swarm by running:
docker swarm update --task-history-limit=1
Which will only keep one previous task instead of the default 5. See the cli docs for more details: https://docs.docker.com/engine/reference/commandline/swarm_update/
Instead this worked better to clear task history and show only the current running containers.
#docker swarm update --task-history-limit 0
最多设置5个标签!
You can adjust the history limit in swarm by running:
Which will only keep one previous task instead of the default 5. See the cli docs for more details: https://docs.docker.com/engine/reference/commandline/swarm_update/
Instead this worked better to clear task history and show only the current running containers.