06_delete the service running on the swarm

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了06_delete the service running on the swarm相关的知识,希望对你有一定的参考价值。

删除集群中的某个服务

$ docker service rm helloworld
helloworld


使用以下命令验证服务是否还存在

docker service inspect <SERVICE-ID>

$ docker service inspect helloworld
[]
Error: no such service: helloworld


即使服务不存在了,但是删除该服务对应的容器需要花费几秒的时间

$ docker ps
    CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
    db1651f50347        alpine:latest       "ping docker.com"        44 minutes ago      Up 46 seconds                           helloworld.5.9lkmos2beppihw95vdwxy1j3w
    43bf6e532a92        alpine:latest       "ping docker.com"        44 minutes ago      Up 46 seconds                           helloworld.3.a71i8rp6fua79ad43ycocl4t2
    5a0fb65d8fa7        alpine:latest       "ping docker.com"        44 minutes ago      Up 45 seconds                           helloworld.2.2jpgensh7d935qdc857pxulfr
    afb0ba67076f        alpine:latest       "ping docker.com"        44 minutes ago      Up 46 seconds                           helloworld.4.1c47o7tluz7drve4vkm2m5olx
    688172d3bfaa        alpine:latest       "ping docker.com"        45 minutes ago      Up About a minute                       helloworld.1.74nbhb3fhud8jfrhigd7s29we
$ docker ps
   CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS


本文出自 “清风柳絮” 博客,请务必保留此出处http://binuu.blog.51cto.com/801317/1942377

以上是关于06_delete the service running on the swarm的主要内容,如果未能解决你的问题,请参考以下文章

解决The VMware Authorization Service is not run的情况

vue 项目npm run dev(启动)时报错The service was stopped

启动VMware出现报错:The VMware Authorization Service is not running

启动VMware出现报错:The VMware Authorization Service is not running

MySql问题:只读(The MySQL server is running with the --read-only ......)

centos7启动MySQL报 Job for mysqld.service failed because the control process exited with error code. Se