We are using Docker Swarm on developers machines for development. Docker services is using e.g. foo:beta
image.
When a developer builds a new feature for foo
, he builds a new image of the container locally, under the same name (sha is different).
However, we are not being able to update the service to use the new image version. We tried
docker service update --force --image <component>
w/o success.
We are running the latest edge docker build: 17.05.0-ce-rc1-mac8 (16582)
The key is to use a local tag for images, that does not exist on remote repository. When Swarm can't find the image by given tag on remote repo, it will use the local one.
For that purpose, we tag all developer-related containers also with e.g. dev
tag, that only exist on developers machine. This way we can update the image and by forcing the service update, update the running code.