Docker Community Forums

Share and learn in the Docker community.

Swarm --task-history-limit 0 does not work as expected


(Hostingnuggets) #1

Hello,

I set the --task-history-limit to 0 using (docker swarm update) so that I do not see any old shutdown tasks for my services but unfortunately there is still one task which shows up. For example:

$ docker service ps abc123
ID                  NAME                         IMAGE                                    NODE                DESIRED STATE       CURRENT STATE             ERROR               PORTS
w1h1lg4f9msi        firstapp_web.1       registry:5000/firstapp:8cf237b   no1                 Running             Running 23 hours ago                          
do6oo0822l7q         \_ firstapp_web.1   registry:5000/firstapp:8cf237b   no2                 Shutdown            Shutdown 26 minutes ago             

How can I get swarm not keep any task history at all?

Regards,
John