diff options
Diffstat (limited to 'devdocs/docker/engine%2Fswarm%2Fswarm-tutorial%2Fdelete-service%2Findex.html')
| -rw-r--r-- | devdocs/docker/engine%2Fswarm%2Fswarm-tutorial%2Fdelete-service%2Findex.html | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/devdocs/docker/engine%2Fswarm%2Fswarm-tutorial%2Fdelete-service%2Findex.html b/devdocs/docker/engine%2Fswarm%2Fswarm-tutorial%2Fdelete-service%2Findex.html new file mode 100644 index 00000000..3587719b --- /dev/null +++ b/devdocs/docker/engine%2Fswarm%2Fswarm-tutorial%2Fdelete-service%2Findex.html @@ -0,0 +1,27 @@ +<h1>Delete the service running on the swarm</h1> +<p>The remaining steps in the tutorial don’t use the <code class="language-plaintext highlighter-rouge">helloworld</code> service, so now you can delete the service from the swarm.</p> <ol> <li> <p>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 <code class="language-plaintext highlighter-rouge">manager1</code>.</p> </li> <li> <p>Run <code class="language-plaintext highlighter-rouge">docker service rm helloworld</code> to remove the <code class="language-plaintext highlighter-rouge">helloworld</code> service.</p> <div class="highlight"><pre class="highlight" data-language="">$ docker service rm helloworld + +helloworld +</pre></div> </li> <li> <p>Run <code class="language-plaintext highlighter-rouge">docker service inspect <SERVICE-ID></code> to verify that the swarm manager removed the service. The CLI returns a message that the service is not found:</p> <div class="highlight"><pre class="highlight" data-language="">$ docker service inspect helloworld +[] +Error: no such service: helloworld +</pre></div> </li> <li> <p>Even though the service no longer exists, the task containers take a few seconds to clean up. You can use <code class="language-plaintext highlighter-rouge">docker ps</code> on the nodes to verify when the tasks have been removed.</p> <div class="highlight"><pre class="highlight" data-language="">$ 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 NAMES + +</pre></div> </li> </ol> <h2 id="whats-next">What’s next?</h2> <p>In the next step of the tutorial, you set up a new service and apply a <a href="../rolling-update/index">rolling update</a>.</p> +<p><a href="https://docs.docker.com/search/?q=tutorial">tutorial</a>, <a href="https://docs.docker.com/search/?q=cluster%20management">cluster management</a>, <a href="https://docs.docker.com/search/?q=swarm">swarm</a>, <a href="https://docs.docker.com/search/?q=service">service</a></p> +<div class="_attribution"> + <p class="_attribution-p"> + © 2019 Docker, Inc.<br>Licensed under the Apache License, Version 2.0.<br>Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the United States and/or other countries.<br>Docker, Inc. and other parties may also have trademark rights in other terms used herein.<br> + <a href="https://docs.docker.com/engine/swarm/swarm-tutorial/delete-service/" class="_attribution-link">https://docs.docker.com/engine/swarm/swarm-tutorial/delete-service/</a> + </p> +</div> |
