diff options
Diffstat (limited to 'devdocs/docker/engine%2Freference%2Fcommandline%2Fwait%2Findex.html')
| -rw-r--r-- | devdocs/docker/engine%2Freference%2Fcommandline%2Fwait%2Findex.html | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/devdocs/docker/engine%2Freference%2Fcommandline%2Fwait%2Findex.html b/devdocs/docker/engine%2Freference%2Fcommandline%2Fwait%2Findex.html new file mode 100644 index 00000000..c08d91dd --- /dev/null +++ b/devdocs/docker/engine%2Freference%2Fcommandline%2Fwait%2Findex.html @@ -0,0 +1,13 @@ +<h1>docker wait</h1> <p><br></p> <p>Block until one or more containers stop, then print their exit codes</p> <h2 id="usage">Usage</h2> <div class="highlight"><pre class="highlight" data-language="">$ docker wait CONTAINER [CONTAINER...] +</pre></div> <p>For example uses of this command, refer to the <a href="#examples">examples section</a> below.</p> <h2 id="examples">Examples</h2> <p>Start a container in the background.</p> <div class="highlight"><pre class="highlight" data-language="">$ docker run -dit --name=my_container ubuntu bash +</pre></div> <p>Run <code class="language-plaintext highlighter-rouge">docker wait</code>, which should block until the container exits.</p> <div class="highlight"><pre class="highlight" data-language="">$ docker wait my_container +</pre></div> <p>In another terminal, stop the first container. The <code class="language-plaintext highlighter-rouge">docker wait</code> command above returns the exit code.</p> <div class="highlight"><pre class="highlight" data-language="">$ docker stop my_container +</pre></div> <p>This is the same <code class="language-plaintext highlighter-rouge">docker wait</code> command from above, but it now exits, returning <code class="language-plaintext highlighter-rouge">0</code>.</p> <div class="highlight"><pre class="highlight" data-language="">$ docker wait my_container + +0 +</pre></div> <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/reference/commandline/wait/" class="_attribution-link">https://docs.docker.com/engine/reference/commandline/wait/</a> + </p> +</div> |
