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
?
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.