mirror of
https://github.com/jaywcjlove/reference.git
synced 2025-06-17 20:51:21 +08:00
doc: update docs/docker.md #583 37906f6548
This commit is contained in:
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 8.7 MiB After Width: | Height: | Size: 8.7 MiB |
@ -33,14 +33,13 @@
|
|||||||
<p>这是 <a href="https://docs.docker.com/get-started/">Docker</a> 的快速参考备忘单。 你可以在这里找到最常见的 Docker 命令。</p>
|
<p>这是 <a href="https://docs.docker.com/get-started/">Docker</a> 的快速参考备忘单。 你可以在这里找到最常见的 Docker 命令。</p>
|
||||||
</div></header><div class="menu-tocs"><div class="menu-btn"><svg aria-hidden="true" fill="currentColor" height="1em" width="1em" viewBox="0 0 16 16" version="1.1" data-view-component="true">
|
</div></header><div class="menu-tocs"><div class="menu-btn"><svg aria-hidden="true" fill="currentColor" height="1em" width="1em" viewBox="0 0 16 16" version="1.1" data-view-component="true">
|
||||||
<path fill-rule="evenodd" d="M2 4a1 1 0 100-2 1 1 0 000 2zm3.75-1.5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zM3 8a1 1 0 11-2 0 1 1 0 012 0zm-1 6a1 1 0 100-2 1 1 0 000 2z"></path>
|
<path fill-rule="evenodd" d="M2 4a1 1 0 100-2 1 1 0 000 2zm3.75-1.5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zM3 8a1 1 0 11-2 0 1 1 0 012 0zm-1 6a1 1 0 100-2 1 1 0 000 2z"></path>
|
||||||
</svg></div><div class="menu-modal"><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#入门">入门</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#安装">安装</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#入门-1">入门</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#一般命令">一般命令</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#docker-容器">Docker 容器</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#启动和停止">启动和停止</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#说明">说明</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#创建容器">创建容器</a><a aria-hidden="true" class="leve4 tocs-link" data-num="4" href="#实例">实例</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#操控">操控</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#docker-镜像">Docker 镜像</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#操控-1">操控</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#构建镜像">构建镜像</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#删除-none-镜像">删除 <none> 镜像</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#docker-网络">Docker 网络</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#操作">操作</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#创建网络">创建网络</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#docker-快捷键">Docker 快捷键</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#退出---关闭容器">退出 - 关闭容器</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#退出---保留容器">退出 - 保留容器</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#退出---容器分离">退出 - 容器分离</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#各种各样的">各种各样的</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#docker-hub">Docker Hub</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#镜像仓库命令">镜像仓库命令</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#批量清除">批量清除</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#卷-volume">卷 volume</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#docker-compose">Docker Compose</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#docker-services">Docker Services</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#docker-stack">Docker Stack</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#docker-machine">Docker Machine</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#docker-主要命令">docker 主要命令</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#docker-管理命令">docker 管理命令</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#docker-全局参数">docker 全局参数</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#docker-images">docker images</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#docker-runcreate">docker run/create</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#docker-示例">Docker 示例</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#docker-web-管理工具-portainer">Docker Web 管理工具 portainer</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#在线代码编辑器-code-server">在线代码编辑器 Code Server</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#mysql">MySQL</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#redis">Redis</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#nginx">Nginx</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#postgresql">PostgreSQL</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#媒体管理工具-dim">媒体管理工具 Dim</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#gitlab">Gitlab</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#另见">另见</a></div></div><div class="h1wrap-body"><div class="wrap h2body-exist"><div class="wrap-header h2wrap"><h2 id="入门"><a aria-hidden="true" tabindex="-1" href="#入门"><span class="icon icon-link"></span></a>入门</h2><div class="wrap-body">
|
</svg></div><div class="menu-modal"><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#入门">入门</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#入门-1">入门</a><a aria-hidden="true" class="leve4 tocs-link" data-num="4" href="#安装">安装</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#一般命令">一般命令</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#docker-容器">Docker 容器</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#启动和停止">启动和停止</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#说明">说明</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#创建容器">创建容器</a><a aria-hidden="true" class="leve4 tocs-link" data-num="4" href="#实例">实例</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#操控">操控</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#docker-镜像">Docker 镜像</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#操控-1">操控</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#构建镜像">构建镜像</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#删除-none-镜像">删除 <none> 镜像</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#docker-网络">Docker 网络</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#创建网络">创建网络</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#操作">操作</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#删除网络">删除网络</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#列出网络">列出网络</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#docker-快捷键">Docker 快捷键</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#退出---关闭容器">退出 - 关闭容器</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#退出---保留容器">退出 - 保留容器</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#退出---容器分离">退出 - 容器分离</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#各种各样的">各种各样的</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#docker-hub">Docker Hub</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#镜像仓库命令">镜像仓库命令</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#批量清除">批量清除</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#卷-volume">卷 volume</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#docker-compose">Docker Compose</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#docker-services">Docker Services</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#docker-stack">Docker Stack</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#docker-machine">Docker Machine</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#docker-主要命令">docker 主要命令</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#docker-管理命令">docker 管理命令</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#docker-全局参数">docker 全局参数</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#docker-images">docker images</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#docker-runcreate">docker run/create</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#docker-示例">Docker 示例</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#docker-web-管理工具-portainer">Docker Web 管理工具 portainer</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#在线代码编辑器-code-server">在线代码编辑器 Code Server</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#mysql">MySQL</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#redis">Redis</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#nginx">Nginx</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#postgresql">PostgreSQL</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#媒体管理工具-dim">媒体管理工具 Dim</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#gitlab">Gitlab</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#另见">另见</a></div></div><div class="h1wrap-body"><div class="wrap h2body-exist"><div class="wrap-header h2wrap"><h2 id="入门"><a aria-hidden="true" tabindex="-1" href="#入门"><span class="icon icon-link"></span></a>入门</h2><div class="wrap-body">
|
||||||
<!--rehype:body-class=cols-2-->
|
<!--rehype:body-class=cols-2-->
|
||||||
</div></div><div class="h2wrap-body cols-2"><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="安装"><a aria-hidden="true" tabindex="-1" href="#安装"><span class="icon icon-link"></span></a>安装</h3><div class="wrap-body">
|
</div></div><div class="h2wrap-body cols-2"><div class="wrap h3body-exist"><div class="wrap-header h3wrap"><h3 id="入门-1"><a aria-hidden="true" tabindex="-1" href="#入门-1"><span class="icon icon-link"></span></a>入门</h3><div class="wrap-body">
|
||||||
|
<h4 id="安装"><a aria-hidden="true" tabindex="-1" href="#安装"><span class="icon icon-link"></span></a>安装</h4>
|
||||||
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line"><span class="token function">curl</span> <span class="token parameter variable">-sSL</span> https://get.docker.com/ <span class="token operator">|</span> <span class="token function">sh</span>
|
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line"><span class="token function">curl</span> <span class="token parameter variable">-sSL</span> https://get.docker.com/ <span class="token operator">|</span> <span class="token function">sh</span>
|
||||||
</span><span class="code-line"><span class="token function">sudo</span> <span class="token function">chmod</span> <span class="token number">777</span> /var/run/docker.sock
|
</span><span class="code-line"><span class="token function">sudo</span> <span class="token function">chmod</span> <span class="token number">777</span> /var/run/docker.sock
|
||||||
</span></code></pre>
|
</span></code></pre>
|
||||||
</div></div></div><div class="wrap h3body-not-exist row-span-2"><div class="wrap-header h3wrap"><h3 id="入门-1"><a aria-hidden="true" tabindex="-1" href="#入门-1"><span class="icon icon-link"></span></a>入门</h3><div class="wrap-body">
|
|
||||||
<!--rehype:wrap-class=row-span-2-->
|
|
||||||
<p>在后台创建和运行容器</p>
|
<p>在后台创建和运行容器</p>
|
||||||
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line">$ <span class="token function">docker</span> run <span class="token parameter variable">-d</span> <span class="token parameter variable">-p</span> <span class="token number">80</span>:80 docker/getting-started
|
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line">$ <span class="token function">docker</span> run <span class="token parameter variable">-d</span> <span class="token parameter variable">-p</span> <span class="token number">80</span>:80 docker/getting-started
|
||||||
</span></code></pre>
|
</span></code></pre>
|
||||||
@ -304,32 +303,12 @@
|
|||||||
</span></code></pre>
|
</span></code></pre>
|
||||||
</div></div></div></div></div><div class="wrap h2body-exist"><div class="wrap-header h2wrap"><h2 id="docker-网络"><a aria-hidden="true" tabindex="-1" href="#docker-网络"><span class="icon icon-link"></span></a>Docker 网络</h2><div class="wrap-body">
|
</div></div></div></div></div><div class="wrap h2body-exist"><div class="wrap-header h2wrap"><h2 id="docker-网络"><a aria-hidden="true" tabindex="-1" href="#docker-网络"><span class="icon icon-link"></span></a>Docker 网络</h2><div class="wrap-body">
|
||||||
<!--rehype:body-class=cols-2-->
|
<!--rehype:body-class=cols-2-->
|
||||||
</div></div><div class="h2wrap-body cols-2"><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="操作"><a aria-hidden="true" tabindex="-1" href="#操作"><span class="icon icon-link"></span></a>操作</h3><div class="wrap-body">
|
</div></div><div class="h2wrap-body cols-2"><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="创建网络"><a aria-hidden="true" tabindex="-1" href="#创建网络"><span class="icon icon-link"></span></a>创建网络</h3><div class="wrap-body">
|
||||||
<p>获取容器连接的网络</p>
|
|
||||||
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line"><span class="token function">docker</span> inspect MyContainer <span class="token operator">|</span> <span class="token function">grep</span> Network
|
|
||||||
</span></code></pre>
|
|
||||||
<p>删除网络</p>
|
|
||||||
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line"><span class="token function">docker</span> network <span class="token function">rm</span> MyOverlayNetwork
|
|
||||||
</span></code></pre>
|
|
||||||
<p>列出网络</p>
|
|
||||||
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line"><span class="token function">docker</span> network <span class="token function">ls</span>
|
|
||||||
</span></code></pre>
|
|
||||||
<p>获取有关网络的信息</p>
|
|
||||||
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line"><span class="token function">docker</span> network inspect MyOverlayNetwork
|
|
||||||
</span></code></pre>
|
|
||||||
<p>将正在运行的容器连接到网络</p>
|
|
||||||
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line"><span class="token function">docker</span> network connect MyOverlayNetwork nginx
|
|
||||||
</span></code></pre>
|
|
||||||
<p>启动时将容器连接到网络</p>
|
|
||||||
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line"><span class="token function">docker</span> run <span class="token parameter variable">-it</span> <span class="token parameter variable">-d</span> <span class="token parameter variable">--network</span><span class="token operator">=</span>MyOverlayNetwork nginx
|
|
||||||
</span></code></pre>
|
|
||||||
<p>断开容器与网络的连接</p>
|
|
||||||
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line"><span class="token function">docker</span> network disconnect MyOverlayNetwork nginx
|
|
||||||
</span></code></pre>
|
|
||||||
</div></div></div><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="创建网络"><a aria-hidden="true" tabindex="-1" href="#创建网络"><span class="icon icon-link"></span></a>创建网络</h3><div class="wrap-body">
|
|
||||||
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line"><span class="token function">docker</span> network create <span class="token parameter variable">-d</span> overlay MyOverlayNetwork
|
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line"><span class="token function">docker</span> network create <span class="token parameter variable">-d</span> overlay MyOverlayNetwork
|
||||||
</span><span class="code-line"><span class="token function">docker</span> network create <span class="token parameter variable">-d</span> bridge MyBridgeNetwork
|
</span><span class="code-line"><span class="token function">docker</span> network create <span class="token parameter variable">-d</span> bridge MyBridgeNetwork
|
||||||
</span><span class="code-line"><span class="token function">docker</span> network create <span class="token parameter variable">-d</span> overlay <span class="token punctuation">\</span>
|
</span></code></pre>
|
||||||
|
<p>自定义网络子网和网关</p>
|
||||||
|
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line"><span class="token function">docker</span> network create <span class="token parameter variable">-d</span> overlay <span class="token punctuation">\</span>
|
||||||
</span><span class="code-line"> <span class="token parameter variable">--subnet</span><span class="token operator">=</span><span class="token number">192.168</span>.0.0/16 <span class="token punctuation">\</span>
|
</span><span class="code-line"> <span class="token parameter variable">--subnet</span><span class="token operator">=</span><span class="token number">192.168</span>.0.0/16 <span class="token punctuation">\</span>
|
||||||
</span><span class="code-line"> <span class="token parameter variable">--subnet</span><span class="token operator">=</span><span class="token number">192.170</span>.0.0/16 <span class="token punctuation">\</span>
|
</span><span class="code-line"> <span class="token parameter variable">--subnet</span><span class="token operator">=</span><span class="token number">192.170</span>.0.0/16 <span class="token punctuation">\</span>
|
||||||
</span><span class="code-line"> <span class="token parameter variable">--gateway</span><span class="token operator">=</span><span class="token number">192.168</span>.0.100 <span class="token punctuation">\</span>
|
</span><span class="code-line"> <span class="token parameter variable">--gateway</span><span class="token operator">=</span><span class="token number">192.168</span>.0.100 <span class="token punctuation">\</span>
|
||||||
@ -341,6 +320,29 @@
|
|||||||
</span><span class="code-line"> --aux-address<span class="token operator">=</span><span class="token string">"my-nas=192.170.1.6"</span> <span class="token punctuation">\</span>
|
</span><span class="code-line"> --aux-address<span class="token operator">=</span><span class="token string">"my-nas=192.170.1.6"</span> <span class="token punctuation">\</span>
|
||||||
</span><span class="code-line"> MyOverlayNetwork
|
</span><span class="code-line"> MyOverlayNetwork
|
||||||
</span></code></pre>
|
</span></code></pre>
|
||||||
|
</div></div></div><div class="wrap h3body-not-exist row-span-3"><div class="wrap-header h3wrap"><h3 id="操作"><a aria-hidden="true" tabindex="-1" href="#操作"><span class="icon icon-link"></span></a>操作</h3><div class="wrap-body">
|
||||||
|
<!--rehype:wrap-class=row-span-3-->
|
||||||
|
<p>获取容器连接的网络</p>
|
||||||
|
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line"><span class="token function">docker</span> inspect MyContainer <span class="token operator">|</span> <span class="token function">grep</span> Network
|
||||||
|
</span></code></pre>
|
||||||
|
<p>获取有关网络的信息</p>
|
||||||
|
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line"><span class="token function">docker</span> network inspect <span class="token operator"><</span>network_name<span class="token operator">></span>
|
||||||
|
</span></code></pre>
|
||||||
|
<p>将正在运行的容器连接到网络</p>
|
||||||
|
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line"><span class="token function">docker</span> network connect <span class="token operator"><</span>network_name<span class="token operator">></span> <span class="token operator"><</span>container_name<span class="token operator">></span>
|
||||||
|
</span></code></pre>
|
||||||
|
<p>启动时将容器连接到网络</p>
|
||||||
|
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line"><span class="token function">docker</span> run <span class="token parameter variable">-it</span> <span class="token parameter variable">-d</span> <span class="token parameter variable">--network</span><span class="token operator">=</span><span class="token operator"><</span>network_name<span class="token operator">></span> <span class="token operator"><</span>container_name<span class="token operator">></span>
|
||||||
|
</span></code></pre>
|
||||||
|
<p>断开容器与网络的连接</p>
|
||||||
|
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line"><span class="token function">docker</span> network disconnect <span class="token operator"><</span>network_name<span class="token operator">></span> <span class="token operator"><</span>container_name<span class="token operator">></span>
|
||||||
|
</span></code></pre>
|
||||||
|
</div></div></div><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="删除网络"><a aria-hidden="true" tabindex="-1" href="#删除网络"><span class="icon icon-link"></span></a>删除网络</h3><div class="wrap-body">
|
||||||
|
<pre class="language-bash"><code class="language-bash code-highlight"><span class="code-line"><span class="token function">docker</span> network <span class="token function">rm</span> <span class="token operator"><</span>network_name<span class="token operator">></span>
|
||||||
|
</span></code></pre>
|
||||||
|
</div></div></div><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="列出网络"><a aria-hidden="true" tabindex="-1" href="#列出网络"><span class="icon icon-link"></span></a>列出网络</h3><div class="wrap-body">
|
||||||
|
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line"><span class="token function">docker</span> network <span class="token function">ls</span>
|
||||||
|
</span></code></pre>
|
||||||
</div></div></div></div></div><div class="wrap h2body-exist"><div class="wrap-header h2wrap"><h2 id="docker-快捷键"><a aria-hidden="true" tabindex="-1" href="#docker-快捷键"><span class="icon icon-link"></span></a>Docker 快捷键</h2><div class="wrap-body">
|
</div></div></div></div></div><div class="wrap h2body-exist"><div class="wrap-header h2wrap"><h2 id="docker-快捷键"><a aria-hidden="true" tabindex="-1" href="#docker-快捷键"><span class="icon icon-link"></span></a>Docker 快捷键</h2><div class="wrap-body">
|
||||||
<p>需要特别注意的是,退出快捷键中的删除容器实例,只对于使用 <code>docker attach</code> 进入的容器生效,使用 <code>docker exec</code> 进入容器后,使用上面的快捷键后将隔离容器,且不会删除容器实例。</p>
|
<p>需要特别注意的是,退出快捷键中的删除容器实例,只对于使用 <code>docker attach</code> 进入的容器生效,使用 <code>docker exec</code> 进入容器后,使用上面的快捷键后将隔离容器,且不会删除容器实例。</p>
|
||||||
</div></div><div class="h2wrap-body"><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="退出---关闭容器"><a aria-hidden="true" tabindex="-1" href="#退出---关闭容器"><span class="icon icon-link"></span></a>退出 - 关闭容器</h3><div class="wrap-body">
|
</div></div><div class="h2wrap-body"><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="退出---关闭容器"><a aria-hidden="true" tabindex="-1" href="#退出---关闭容器"><span class="icon icon-link"></span></a>退出 - 关闭容器</h3><div class="wrap-body">
|
||||||
|
11
index.html
11
index.html
@ -883,7 +883,6 @@
|
|||||||
<a href="https://github.com/XYZscratcher" title="XYZ"><img src="https://avatars.githubusercontent.com/u/108533817?v=4" width="42;" alt="XYZ"></a>
|
<a href="https://github.com/XYZscratcher" title="XYZ"><img src="https://avatars.githubusercontent.com/u/108533817?v=4" width="42;" alt="XYZ"></a>
|
||||||
<a href="https://github.com/greyhao" title="greyhao"><img src="https://avatars.githubusercontent.com/u/107107440?v=4" width="42;" alt="greyhao"></a>
|
<a href="https://github.com/greyhao" title="greyhao"><img src="https://avatars.githubusercontent.com/u/107107440?v=4" width="42;" alt="greyhao"></a>
|
||||||
<a href="https://github.com/findnr" title="findnr"><img src="https://avatars.githubusercontent.com/u/3909023?v=4" width="42;" alt="findnr"></a>
|
<a href="https://github.com/findnr" title="findnr"><img src="https://avatars.githubusercontent.com/u/3909023?v=4" width="42;" alt="findnr"></a>
|
||||||
<a href="https://github.com/kubeme" title="kubernetes for me"><img src="https://avatars.githubusercontent.com/u/16346220?v=4" width="42;" alt="kubernetes for me"></a>
|
|
||||||
<a href="https://github.com/genius-kim" title="Kim同学"><img src="https://avatars.githubusercontent.com/u/119488561?v=4" width="42;" alt="Kim同学"></a>
|
<a href="https://github.com/genius-kim" title="Kim同学"><img src="https://avatars.githubusercontent.com/u/119488561?v=4" width="42;" alt="Kim同学"></a>
|
||||||
<a href="https://github.com/kdxcxs" title="kdxcxs"><img src="https://avatars.githubusercontent.com/u/18746192?v=4" width="42;" alt="kdxcxs"></a>
|
<a href="https://github.com/kdxcxs" title="kdxcxs"><img src="https://avatars.githubusercontent.com/u/18746192?v=4" width="42;" alt="kdxcxs"></a>
|
||||||
<a href="https://github.com/k983551019" title="k983551019"><img src="https://avatars.githubusercontent.com/u/48147837?v=4" width="42;" alt="k983551019"></a>
|
<a href="https://github.com/k983551019" title="k983551019"><img src="https://avatars.githubusercontent.com/u/48147837?v=4" width="42;" alt="k983551019"></a>
|
||||||
@ -907,6 +906,7 @@
|
|||||||
<a href="https://github.com/Lmmmmmm-bb" title="_lmmmmmm"><img src="https://avatars.githubusercontent.com/u/54026110?v=4" width="42;" alt="_lmmmmmm"></a>
|
<a href="https://github.com/Lmmmmmm-bb" title="_lmmmmmm"><img src="https://avatars.githubusercontent.com/u/54026110?v=4" width="42;" alt="_lmmmmmm"></a>
|
||||||
<a href="https://github.com/y52y" title="Zyj"><img src="https://avatars.githubusercontent.com/u/51304324?v=4" width="42;" alt="Zyj"></a>
|
<a href="https://github.com/y52y" title="Zyj"><img src="https://avatars.githubusercontent.com/u/51304324?v=4" width="42;" alt="Zyj"></a>
|
||||||
<a href="https://github.com/Leaderzhangyi" title="ZinkCas"><img src="https://avatars.githubusercontent.com/u/46915666?v=4" width="42;" alt="ZinkCas"></a>
|
<a href="https://github.com/Leaderzhangyi" title="ZinkCas"><img src="https://avatars.githubusercontent.com/u/46915666?v=4" width="42;" alt="ZinkCas"></a>
|
||||||
|
<a href="https://github.com/zhu0629" title="zhucong"><img src="https://avatars.githubusercontent.com/u/13188450?v=4" width="42;" alt="zhucong"></a>
|
||||||
<a href="https://github.com/Zeng-qh" title="都一样"><img src="https://avatars.githubusercontent.com/u/40046415?v=4" width="42;" alt="都一样"></a>
|
<a href="https://github.com/Zeng-qh" title="都一样"><img src="https://avatars.githubusercontent.com/u/40046415?v=4" width="42;" alt="都一样"></a>
|
||||||
<a href="https://github.com/binscor" title="Zheng Nai Bin"><img src="https://avatars.githubusercontent.com/u/37325821?v=4" width="42;" alt="Zheng Nai Bin"></a>
|
<a href="https://github.com/binscor" title="Zheng Nai Bin"><img src="https://avatars.githubusercontent.com/u/37325821?v=4" width="42;" alt="Zheng Nai Bin"></a>
|
||||||
<a href="https://github.com/qwxingzhe" title="行者"><img src="https://avatars.githubusercontent.com/u/7071651?v=4" width="42;" alt="行者"></a>
|
<a href="https://github.com/qwxingzhe" title="行者"><img src="https://avatars.githubusercontent.com/u/7071651?v=4" width="42;" alt="行者"></a>
|
||||||
@ -931,9 +931,10 @@
|
|||||||
<a href="https://github.com/lykjjj" title="lykjjj"><img src="https://avatars.githubusercontent.com/u/58510058?v=4" width="42;" alt="lykjjj"></a>
|
<a href="https://github.com/lykjjj" title="lykjjj"><img src="https://avatars.githubusercontent.com/u/58510058?v=4" width="42;" alt="lykjjj"></a>
|
||||||
<a href="https://github.com/liliangrong777" title="liliangrong777"><img src="https://avatars.githubusercontent.com/u/58727146?v=4" width="42;" alt="liliangrong777"></a>
|
<a href="https://github.com/liliangrong777" title="liliangrong777"><img src="https://avatars.githubusercontent.com/u/58727146?v=4" width="42;" alt="liliangrong777"></a>
|
||||||
<a href="https://github.com/larry-xue" title="larry"><img src="https://avatars.githubusercontent.com/u/48818060?v=4" width="42;" alt="larry"></a>
|
<a href="https://github.com/larry-xue" title="larry"><img src="https://avatars.githubusercontent.com/u/48818060?v=4" width="42;" alt="larry"></a>
|
||||||
<a href="https://github.com/likeshop-github" title="LikeShop技术社区"><img src="https://avatars.githubusercontent.com/u/77180968?v=4" width="42;" alt="LikeShop技术社区"></a>
|
<a href="https://github.com/kubeme" title="kubernetes for me"><img src="https://avatars.githubusercontent.com/u/16346220?v=4" width="42;" alt="kubernetes for me"></a>
|
||||||
<a href="https://github.com/Lihuagreek" title="Lihuagreek"><img src="https://avatars.githubusercontent.com/u/51040740?v=4" width="42;" alt="Lihuagreek"></a>
|
<a href="https://github.com/Lihuagreek" title="Lihuagreek"><img src="https://avatars.githubusercontent.com/u/51040740?v=4" width="42;" alt="Lihuagreek"></a>
|
||||||
<a href="https://github.com/LightQuanta" title="Light_Quanta"><img src="https://avatars.githubusercontent.com/u/18213217?v=4" width="42;" alt="Light_Quanta"></a>
|
<a href="https://github.com/LightQuanta" title="Light_Quanta"><img src="https://avatars.githubusercontent.com/u/18213217?v=4" width="42;" alt="Light_Quanta"></a>
|
||||||
|
<a href="https://github.com/LesterChang0987" title="LesterChang0987"><img src="https://avatars.githubusercontent.com/u/114913921?v=4" width="42;" alt="LesterChang0987"></a>
|
||||||
<a href="https://github.com/JetSquirrel" title="JetSquirrel"><img src="https://avatars.githubusercontent.com/u/20291255?v=4" width="42;" alt="JetSquirrel"></a>
|
<a href="https://github.com/JetSquirrel" title="JetSquirrel"><img src="https://avatars.githubusercontent.com/u/20291255?v=4" width="42;" alt="JetSquirrel"></a>
|
||||||
<a href="https://github.com/JavaZeroo" title="JavaZero"><img src="https://avatars.githubusercontent.com/u/71128095?v=4" width="42;" alt="JavaZero"></a>
|
<a href="https://github.com/JavaZeroo" title="JavaZero"><img src="https://avatars.githubusercontent.com/u/71128095?v=4" width="42;" alt="JavaZero"></a>
|
||||||
<a href="https://github.com/jasnzhuang" title="Jason Zhuang"><img src="https://avatars.githubusercontent.com/u/16612921?v=4" width="42;" alt="Jason Zhuang"></a>
|
<a href="https://github.com/jasnzhuang" title="Jason Zhuang"><img src="https://avatars.githubusercontent.com/u/16612921?v=4" width="42;" alt="Jason Zhuang"></a>
|
||||||
@ -955,7 +956,6 @@
|
|||||||
<a href="https://github.com/BlacAmDK" title="BlacAmDK"><img src="https://avatars.githubusercontent.com/u/10971397?v=4" width="42;" alt="BlacAmDK"></a>
|
<a href="https://github.com/BlacAmDK" title="BlacAmDK"><img src="https://avatars.githubusercontent.com/u/10971397?v=4" width="42;" alt="BlacAmDK"></a>
|
||||||
<a href="https://github.com/dousha0w0" title="dousha0w0"><img src="https://avatars.githubusercontent.com/u/52566311?v=4" width="42;" alt="dousha0w0"></a>
|
<a href="https://github.com/dousha0w0" title="dousha0w0"><img src="https://avatars.githubusercontent.com/u/52566311?v=4" width="42;" alt="dousha0w0"></a>
|
||||||
<a href="https://github.com/13812700839" title="花殇"><img src="https://avatars.githubusercontent.com/u/58072506?v=4" width="42;" alt="花殇"></a>
|
<a href="https://github.com/13812700839" title="花殇"><img src="https://avatars.githubusercontent.com/u/58072506?v=4" width="42;" alt="花殇"></a>
|
||||||
<a href="https://github.com/zhu0629" title="zhucong"><img src="https://avatars.githubusercontent.com/u/13188450?v=4" width="42;" alt="zhucong"></a>
|
|
||||||
<a href="https://github.com/yikuaibro" title="yikuaibro"><img src="https://avatars.githubusercontent.com/u/44493045?v=4" width="42;" alt="yikuaibro"></a>
|
<a href="https://github.com/yikuaibro" title="yikuaibro"><img src="https://avatars.githubusercontent.com/u/44493045?v=4" width="42;" alt="yikuaibro"></a>
|
||||||
<a href="https://github.com/dfshizhiqiang" title="Zech"><img src="https://avatars.githubusercontent.com/u/7030019?v=4" width="42;" alt="Zech"></a>
|
<a href="https://github.com/dfshizhiqiang" title="Zech"><img src="https://avatars.githubusercontent.com/u/7030019?v=4" width="42;" alt="Zech"></a>
|
||||||
<a href="https://github.com/Yo-gurts" title="Yogurt"><img src="https://avatars.githubusercontent.com/u/44612841?v=4" width="42;" alt="Yogurt"></a>
|
<a href="https://github.com/Yo-gurts" title="Yogurt"><img src="https://avatars.githubusercontent.com/u/44612841?v=4" width="42;" alt="Yogurt"></a>
|
||||||
@ -978,7 +978,8 @@
|
|||||||
<a href="https://github.com/mo3et" title="Monet Lee"><img src="https://avatars.githubusercontent.com/u/34803812?v=4" width="42;" alt="Monet Lee"></a>
|
<a href="https://github.com/mo3et" title="Monet Lee"><img src="https://avatars.githubusercontent.com/u/34803812?v=4" width="42;" alt="Monet Lee"></a>
|
||||||
<a href="https://github.com/Moeyuuko" title="Moeyuuko"><img src="https://avatars.githubusercontent.com/u/14266681?v=4" width="42;" alt="Moeyuuko"></a>
|
<a href="https://github.com/Moeyuuko" title="Moeyuuko"><img src="https://avatars.githubusercontent.com/u/14266681?v=4" width="42;" alt="Moeyuuko"></a>
|
||||||
<a href="https://github.com/malcolmyu" title="Minghao Yu"><img src="https://avatars.githubusercontent.com/u/3203962?v=4" width="42;" alt="Minghao Yu"></a>
|
<a href="https://github.com/malcolmyu" title="Minghao Yu"><img src="https://avatars.githubusercontent.com/u/3203962?v=4" width="42;" alt="Minghao Yu"></a>
|
||||||
<a href="https://github.com/mariuszmichalowski" title="Mariusz Michalowski"><img src="https://avatars.githubusercontent.com/u/92091891?v=4" width="42;" alt="Mariusz Michalowski"></a><!--GAMFC-END--></p>
|
<a href="https://github.com/mariuszmichalowski" title="Mariusz Michalowski"><img src="https://avatars.githubusercontent.com/u/92091891?v=4" width="42;" alt="Mariusz Michalowski"></a>
|
||||||
|
<a href="https://github.com/likeshop-github" title="LikeShop技术社区"><img src="https://avatars.githubusercontent.com/u/77180968?v=4" width="42;" alt="LikeShop技术社区"></a><!--GAMFC-END--></p>
|
||||||
<p style="padding-top:1rem;"><a href="https://github.com/jaywcjlove/reference/graphs/contributors">贡献者</a>列表,由 <a href="https://github.com/jaywcjlove/github-action-contributors">contributors</a> 根据提交次数的先后顺序自动生成</p>
|
<p style="padding-top:1rem;"><a href="https://github.com/jaywcjlove/reference/graphs/contributors">贡献者</a>列表,由 <a href="https://github.com/jaywcjlove/github-action-contributors">contributors</a> 根据提交次数的先后顺序自动生成</p>
|
||||||
<!--rehype:style=padding-top:1rem;-->
|
<!--rehype:style=padding-top:1rem;-->
|
||||||
</div></div><div class="h2wrap-body"></div></div><div class="wrap h2body-not-exist" style="text-align: center;max-width: 650px;margin: 0 auto;"><div class="wrap-header h2wrap"><h2 class="home-title-reset" id="国内镜像网站"><a aria-hidden="true" tabindex="-1" href="#国内镜像网站"><span class="icon icon-link"></span></a>国内镜像网站</h2><div class="wrap-body">
|
</div></div><div class="h2wrap-body"></div></div><div class="wrap h2body-not-exist" style="text-align: center;max-width: 650px;margin: 0 auto;"><div class="wrap-header h2wrap"><h2 class="home-title-reset" id="国内镜像网站"><a aria-hidden="true" tabindex="-1" href="#国内镜像网站"><span class="icon icon-link"></span></a>国内镜像网站</h2><div class="wrap-body">
|
||||||
@ -1311,7 +1312,7 @@
|
|||||||
<!--rehype:class=home-card home-links-->
|
<!--rehype:class=home-card home-links-->
|
||||||
<p>如果你有资源,可以很方便<a href="https://github.com/jaywcjlove/reference/issues/102#issue-1451649637">部署 web 版</a>,这非常简单,只需要克隆 <a href="https://github.com/jaywcjlove/reference/tree/gh-pages">gh-pages</a> 分支代码到你的静态服务就可以了,还可以使用 <a href="https://hub.docker.com/r/wcjiang/reference">docker</a> 快捷部署 web 版。</p>
|
<p>如果你有资源,可以很方便<a href="https://github.com/jaywcjlove/reference/issues/102#issue-1451649637">部署 web 版</a>,这非常简单,只需要克隆 <a href="https://github.com/jaywcjlove/reference/tree/gh-pages">gh-pages</a> 分支代码到你的静态服务就可以了,还可以使用 <a href="https://hub.docker.com/r/wcjiang/reference">docker</a> 快捷部署 web 版。</p>
|
||||||
|
|
||||||
</div></div><div class="h2wrap-body"></div></div></div></div><footer class="footer-wrap"><footer class="max-container">© 2022 <a href="https://wangchujiang.com/#/app" target="_blank">Kenny Wang</a>. Updated on 2024/03/26 21:12:34</footer></footer><script src="data.js?v=1.5.3" defer></script><script src="js/fuse.min.js?v=1.5.3" defer></script><script src="js/main.js?v=1.5.3" defer></script><div id="mysearch"><div class="mysearch-box"><div class="mysearch-input"><div><svg xmlns="http://www.w3.org/2000/svg" height="1em" width="1em" viewBox="0 0 18 18">
|
</div></div><div class="h2wrap-body"></div></div></div></div><footer class="footer-wrap"><footer class="max-container">© 2022 <a href="https://wangchujiang.com/#/app" target="_blank">Kenny Wang</a>. Updated on 2024/03/29 15:25:02</footer></footer><script src="data.js?v=1.5.3" defer></script><script src="js/fuse.min.js?v=1.5.3" defer></script><script src="js/main.js?v=1.5.3" defer></script><div id="mysearch"><div class="mysearch-box"><div class="mysearch-input"><div><svg xmlns="http://www.w3.org/2000/svg" height="1em" width="1em" viewBox="0 0 18 18">
|
||||||
<path fill="currentColor" d="M17.71,16.29 L14.31,12.9 C15.4069846,11.5024547 16.0022094,9.77665502 16,8 C16,3.581722 12.418278,0 8,0 C3.581722,0 0,3.581722 0,8 C0,12.418278 3.581722,16 8,16 C9.77665502,16.0022094 11.5024547,15.4069846 12.9,14.31 L16.29,17.71 C16.4777666,17.8993127 16.7333625,18.0057983 17,18.0057983 C17.2666375,18.0057983 17.5222334,17.8993127 17.71,17.71 C17.8993127,17.5222334 18.0057983,17.2666375 18.0057983,17 C18.0057983,16.7333625 17.8993127,16.4777666 17.71,16.29 Z M2,8 C2,4.6862915 4.6862915,2 8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 Z"></path>
|
<path fill="currentColor" d="M17.71,16.29 L14.31,12.9 C15.4069846,11.5024547 16.0022094,9.77665502 16,8 C16,3.581722 12.418278,0 8,0 C3.581722,0 0,3.581722 0,8 C0,12.418278 3.581722,16 8,16 C9.77665502,16.0022094 11.5024547,15.4069846 12.9,14.31 L16.29,17.71 C16.4777666,17.8993127 16.7333625,18.0057983 17,18.0057983 C17.2666375,18.0057983 17.5222334,17.8993127 17.71,17.71 C17.8993127,17.5222334 18.0057983,17.2666375 18.0057983,17 C18.0057983,16.7333625 17.8993127,16.4777666 17.71,16.29 Z M2,8 C2,4.6862915 4.6862915,2 8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 Z"></path>
|
||||||
</svg><input id="mysearch-input" type="search" placeholder="搜索" autocomplete="off"><div class="mysearch-clear"></div></div><button id="mysearch-close" type="button">搜索</button></div><div class="mysearch-result"><div id="mysearch-menu"></div><div id="mysearch-content"></div></div></div></div></body>
|
</svg><input id="mysearch-input" type="search" placeholder="搜索" autocomplete="off"><div class="mysearch-clear"></div></div><button id="mysearch-close" type="button">搜索</button></div><div class="mysearch-result"><div id="mysearch-menu"></div><div id="mysearch-content"></div></div></div></div></body>
|
||||||
</html>
|
</html>
|
||||||
|
Reference in New Issue
Block a user