environment
Is there a way to force a rolling update to a docker swarm service already running if the service update is not changing any parameters but the docker hub image has been updated?
Example: I deployed service:
docker service create --replicas 1 --name servicename --publish 80:80 username/imagename:latest
My build process has updated the latest image on docker hub now I want to pull the latest again.
I have tried running:
docker service update --image username/imagename:latest servicename
When I follow this process, docker does not pull the latest, I guess it assumes that since I wanted latest and docker already pulled an image:latest then there is nothing to do.
The only work around I have is to remove the service servicename and redeploy.
Just for future reference:
Docker 1.13 added a --force
flag to service update
:
--force
: Force update even if no changes require it
Use it as in:
docker service update --force service_name