Bootstrap FreeKB - Docker - Delete services using the docker service rm command
Docker - Delete services using the docker service rm command

Updated:   |  Docker articles

The docker service rm <name|ID> command can be used to remove a service. Let's say the docker service ls command returns something like this.

ID            NAME         MODE        REPLICAS  IMAGE                                  PORTS
jwwpwkpzkqe0  foo-service  repliacted  1/1       server1.example.com/foo:latest         *:8101->8080/tcp
rof5uwjm749q  bar-service  repliacted  1/1       server1.example.com/bar:latest         *:8155->8104/tcp
v771iegeoxrm  service003   repliacted  1/1       server1.example.com/helloworld:latest  *:8123->8000/tcp

 

Here is how foo-service could be removed.

docker service rm foo-service

 

Or using the service ID.

docker service rm jwwpwkpzkqe0

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter da2e2c in the box below so that we can be sure you are a human.