4

I have a docker swarm which runs a service named web.

For some reasons I want to rename it. I could delete the service and create a new one, but it's not quite good.

How to rename it to such as old-web?

Yao Zhao
  • 4,373
  • 4
  • 22
  • 30

1 Answers1

0

The command below used to work in older Docker versions:

docker service update --name old-web web

However, it is no longer supported and was removed in newer versions. See the following discussion for the more info: https://github.com/moby/moby/issues/25483.

halfer
  • 19,824
  • 17
  • 99
  • 186
yamenk
  • 46,736
  • 10
  • 93
  • 87
  • 1
    I don't see this on their "service_update" documentation - https://docs.docker.com/engine/reference/commandline/service_update/ , Could you please point us to a direction or did you try it in your swarm mode? – vivekyad4v Aug 21 '17 at 07:13