uTools-Manuals/docs/docker/docker rm.html
2019-04-21 11:50:48 +08:00

18 lines
737 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1>Docker rm 命令</h1>
<p><strong>docker rm </strong>删除一个或多少容器</p>
<h3>语法</h3>
<pre>docker rm [OPTIONS] CONTAINER [CONTAINER...]</pre>
<p>OPTIONS说明</p>
<ul><li>
<p><strong>-f :</strong>通过SIGKILL信号强制删除一个运行中的容器</p></li><li>
<p><strong>-l :</strong>移除容器间的网络连接,而非容器本身</p></li><li>
<p><strong>-v :</strong>-v 删除与容器关联的卷</p>
</li></ul>
<h3>实例</h3>
<p>强制删除容器db01、db02</p>
<pre>docker rm -f db01 db02</pre>
<p>移除容器nginx01对容器db01的连接连接名db</p>
<pre>docker rm -l db </pre>
<p>删除容器nginx01,并删除容器挂载的数据卷</p>
<pre>docker rm -v nginx01</pre>