Docker Community Forums

Share and learn in the Docker community.

How do I set up Swarm to automatically listen for updates on the latest tag?

(Dthree) #1

I am trying to set up my first production deployment with Docker Swarm. I have my own private Docker registry.

I will have about 100 remote sites with about 6 services running in each. That means that when I update my production code for, say Service A, I wanted to tag the newly updated code as “latest” in the registry, and I want all 100 sites to see that change, and automatically pull down the latest image in a rolling update for all local instances of that service.

I can’t find much docs on this methodology. I’m not sure that it’s the right way to go about things, but I would rather each site is fully independent and handles itself. I’d rather not issue 100 commands from master and have to track with all of them.

Does anyone have a good starting point or recommendations for me on this? Thanks.

(Martin Terp) #2

Hi :slight_smile:

Maybe you can create a simple script around this function

When you run service update with the --image flag, the swarm manager queries Docker Hub or your private Docker registry for the digest the tag currently points to and updates the service tasks to use that digest.