0

We are using Docker Swarm. We deployed the service with docker stack deploy -c docker-compose.yml Application. During the lifetime of a service, we want to remove one of service labels (service-custom-label) with docker service update --label-rm service-custom-label Application_web. We noticed that after running this command, website is unavailable for ~10 seconds because containers are restarted in the background.

Is it possible to remove Docker service labels without restarting containers in the background and thus not causing website downtime?

Sam Carlson
  • 1,891
  • 1
  • 17
  • 44
  • check this https://stackoverflow.com/questions/58062007/docker-compose-can-i-update-labels-without-restarting-a-container – Z0OM Apr 19 '22 at 09:51
  • Does this answer your question? [docker-compose - Can I update labels without restarting a container?](https://stackoverflow.com/questions/58062007/docker-compose-can-i-update-labels-without-restarting-a-container) – ErikMD Apr 19 '22 at 10:15
  • As far as I know, labels defined in the `deploy` section of `docker-compose.yml` file aren't stored in container but in Docker service. So, I don't want to change container labels, I want to change **Docker service** labels. – Sam Carlson Apr 19 '22 at 10:22
  • 2
    its almost like you answered your own question. But if the website is going down, perhaps run more than one replica. – Chris Becke Apr 19 '22 at 10:45

0 Answers0