0

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)

igr
  • 10,199
  • 13
  • 65
  • 111
  • What's the cluster topology like? Is this a single machine, single manager type scenario (typical of a dev environment)? Or is it more sophisticated than that? The update only works when each node has pulled the latest tag to their local image cache. Otherwise it will force an update but won't update to the newest version of the tag. – huu Apr 27 '17 at 22:30
  • @huu - its local development, ie its a single machine. – igr May 02 '17 at 20:02

1 Answers1

0

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.

igr
  • 10,199
  • 13
  • 65
  • 111