Delete the service (Engine)

Delete the service running on the swarm

The remaining steps in the tutorial don’t use the helloworld service, so now you can delete the service from the swarm.

  1. If you haven’t already, open a terminal and ssh into the machine where you run your manager node. For example, the tutorial uses a machine named manager1.

  2. Run docker service rm helloworld to remove the helloworld service.

    $ docker service rm helloworld
    
    helloworld
    
  3. Run docker service inspect <SERVICE-ID> to verify that the swarm manager removed the service. The CLI returns a message that the service is not found:

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

What’s next?

In the next step of the tutorial, you set up a new service and apply a rolling update.

© 2013–2016 Docker, Inc.
Licensed under the Apache License, Version 2.0.
Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the United States and/or other countries.
Docker, Inc. and other parties may also have trademark rights in other terms used herein.
https://docs.docker.com/engine/swarm/swarm-tutorial/delete-service/

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部