I want to schedule a monthly restart of a docker container that has been set up with docker stack deploy
.
$ docker stack ls
NAME SERVICES ORCHESTRATOR
hello-docker 1 Swarm
But there seems to be no docker stack restart <name>
command.
So how could I tell docker to force a restart on a specific stack?
Or if not possible, restarting the whole docker daemon
would also be fine from cron.
Update
The scale
option in the linked question is a nice trick:
docker service scale myservice=0
docker service scale myservice=1