summaryrefslogtreecommitdiff
path: root/devdocs/docker/engine%2Freference%2Fcommandline%2Fstop%2Findex.html
blob: 785bc9bff0f5a53c7f17297f463e0cb5ec3abba0 (plain)
1
2
3
4
5
6
7
8
9
10
<h1>docker stop</h1>  <p><br></p> <p>Stop one or more running containers</p> <h2 id="usage">Usage</h2> <div class="highlight"><pre class="highlight" data-language="">$ docker stop [OPTIONS] CONTAINER [CONTAINER...]
</pre></div> <p>Refer to the <a href="#options">options section</a> for an overview of available <a href="#options"><code class="language-plaintext highlighter-rouge">OPTIONS</code></a> for this command.</p> <h2 id="description">Description</h2> <p name="extended-description">The main process inside the container will receive <code class="language-plaintext highlighter-rouge">SIGTERM</code>, and after a grace period, <code class="language-plaintext highlighter-rouge">SIGKILL</code>. The first signal can be changed with the <code class="language-plaintext highlighter-rouge">STOPSIGNAL</code> instruction in the container’s Dockerfile, or the <code class="language-plaintext highlighter-rouge">--stop-signal</code> option to <code class="language-plaintext highlighter-rouge">docker run</code>.</p> <p>For example uses of this command, refer to the <a href="#examples">examples section</a> below.</p> <h2 id="options">Options</h2> <table> <thead> <tr> <td>Name, shorthand</td> <td>Default</td> <td>Description</td> </tr> </thead> <tbody> <tr> <td>
<code class="language-plaintext highlighter-rouge">--time</code> , <code class="language-plaintext highlighter-rouge">-t</code>
</td> <td><code class="language-plaintext highlighter-rouge">10</code></td> <td>Seconds to wait for stop before killing it</td> </tr>  </tbody> </table>  <h2 id="examples">Examples</h2> <div class="highlight"><pre class="highlight" data-language="">$ docker stop my_container
</pre></div> <div class="_attribution">
  <p class="_attribution-p">
    &copy; 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/reference/commandline/stop/" class="_attribution-link">https://docs.docker.com/engine/reference/commandline/stop/</a>
  </p>
</div>