Docker Community Forums

Share and learn in the Docker community.

Restart docker service after update in swarm 1.12


(Jlorgal) #1

I’m starting playing with swarm 1.12 and I would like to orchestrate services with built-in capabilities in latest docker version.
My containers usually have a couple of volumes: read-only for config and write for logs. I create these volumes in all my hosts.
Whenever I need to upgrade a container image (to a new version) or when I make any config change, what is the best approach to update the service? I would have expected to do that with

docker service update xxx

but I don’t know how to do that. Perhaps I could use --image to specify the upgrading image tag, but I don’t know how to force restart if I modify any of my volumes. I also expect that the restart is serial to prevent from breaking the service.

Any ideas?