mirror of
https://github.com/jaywcjlove/reference.git
synced 2025-06-18 13:11:20 +08:00
feat: add autolink headings. 617a46c1a5
This commit is contained in:
@ -15,10 +15,10 @@
|
||||
<path d="M15.06 19.39c-.62.42-1.4.77-2.35 1.08l-1.58.52c-3.97 1.28-6.06.21-7.35-3.76L2.5 13.28c-1.28-3.97-.22-6.07 3.75-7.35l1.58-.52c.41-.13.8-.24 1.17-.31-.3.61-.54 1.35-.74 2.2l-.98 4.19c-.98 4.18.31 6.24 4.48 7.23l1.68.4c.58.14 1.12.23 1.62.27Zm2.43-8.88c-.06 0-.12-.01-.19-.02l-4.85-1.23a.75.75 0 0 1 .37-1.45l4.85 1.23a.748.748 0 0 1-.18 1.47Z" fill="currentColor"></path>
|
||||
<path d="M14.56 13.89c-.06 0-.12-.01-.19-.02l-2.91-.74a.75.75 0 0 1 .37-1.45l2.91.74c.4.1.64.51.54.91-.08.34-.38.56-.72.56Z" fill="currentColor"></path>
|
||||
</svg>
|
||||
<span class="title">Quick Reference</span></a><div class="menu"><a href="https://github.com/jaywcjlove/reference/blob/main/docs/docker.md" class="" target="__blank"><svg viewBox="0 0 36 36" fill="currentColor" height="1em" width="1em"><path d="m33 6.4-3.7-3.7a1.71 1.71 0 0 0-2.36 0L23.65 6H6a2 2 0 0 0-2 2v22a2 2 0 0 0 2 2h22a2 2 0 0 0 2-2V11.76l3-3a1.67 1.67 0 0 0 0-2.36ZM18.83 20.13l-4.19.93 1-4.15 9.55-9.57 3.23 3.23ZM29.5 9.43 26.27 6.2l1.85-1.85 3.23 3.23Z"></path><path fill="none" d="M0 0h36v36H0z"></path></svg><span>编辑</span></a><a href="https://github.com/jaywcjlove/reference" class="" target="__blank"><svg viewBox="0 0 16 16" fill="currentColor" height="1em" width="1em"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg></a></div></div></nav><div class="wrap max-container"><header class="wrap-header h1wrap"><h1>Docker 备忘清单</h1><div class="wrap-body">
|
||||
<span class="title">Quick Reference</span></a><div class="menu"><a href="https://github.com/jaywcjlove/reference/blob/main/docs/docker.md" class="" target="__blank"><svg viewBox="0 0 36 36" fill="currentColor" height="1em" width="1em"><path d="m33 6.4-3.7-3.7a1.71 1.71 0 0 0-2.36 0L23.65 6H6a2 2 0 0 0-2 2v22a2 2 0 0 0 2 2h22a2 2 0 0 0 2-2V11.76l3-3a1.67 1.67 0 0 0 0-2.36ZM18.83 20.13l-4.19.93 1-4.15 9.55-9.57 3.23 3.23ZM29.5 9.43 26.27 6.2l1.85-1.85 3.23 3.23Z"></path><path fill="none" d="M0 0h36v36H0z"></path></svg><span>编辑</span></a><a href="https://github.com/jaywcjlove/reference" class="" target="__blank"><svg viewBox="0 0 16 16" fill="currentColor" height="1em" width="1em"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg></a></div></div></nav><div class="wrap max-container"><header class="wrap-header h1wrap"><h1 id="docker-备忘清单"><a aria-hidden="true" tabindex="-1" href="#docker-备忘清单"><span class="icon icon-link"></span></a>Docker 备忘清单</h1><div class="wrap-body">
|
||||
<p>这是 <a href="https://docs.docker.com/get-started/">Docker</a> 的快速参考备忘单。 你可以在这里找到最常见的 Docker 命令。</p>
|
||||
</div></header><div class="h1wrap-body"><div class="wrap"><div class="wrap-header h2wrap"><h2>入门</h2><div class="wrap-body"><!--rehype:body-class=cols-2-->
|
||||
</div></div><div class="h2wrap-body cols-2"><div class="wrap"><div class="wrap-header h3wrap"><h3>入门</h3><div class="wrap-body">
|
||||
</div></header><div class="h1wrap-body"><div class="wrap"><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-->
|
||||
</div></div><div class="h2wrap-body cols-2"><div class="wrap"><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">
|
||||
<p>在后台创建和运行容器</p>
|
||||
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">$ <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>
|
||||
@ -38,7 +38,7 @@
|
||||
<li><code>--name my-nginx</code> - 指定名称</li>
|
||||
<li><code>nginx</code> - 要使用的镜像</li>
|
||||
</ul>
|
||||
</div></div></div><div class="wrap"><div class="wrap-header h3wrap"><h3>一般命令</h3><div class="wrap-body">
|
||||
</div></div></div><div class="wrap"><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">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@ -98,8 +98,8 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<p>参数 <code><container></code> 可以是容器 id 或名称</p>
|
||||
</div></div></div></div></div><div class="wrap"><div class="wrap-header h2wrap"><h2>Docker 容器</h2><div class="wrap-body"><!--rehype:body-class=cols-2-->
|
||||
</div></div><div class="h2wrap-body cols-2"><div class="wrap"><div class="wrap-header h3wrap"><h3>启动和停止</h3><div class="wrap-body">
|
||||
</div></div></div></div></div><div class="wrap"><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-->
|
||||
</div></div><div class="h2wrap-body cols-2"><div class="wrap"><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">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@ -142,7 +142,7 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div></div></div><div class="wrap"><div class="wrap-header h3wrap"><h3>说明</h3><div class="wrap-body">
|
||||
</div></div></div><div class="wrap"><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">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@ -189,7 +189,7 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div></div></div><div class="wrap"><div class="wrap-header h3wrap"><h3>创建容器</h3><div class="wrap-body">
|
||||
</div></div></div><div class="wrap"><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 line-number" line="1"><span class="token function">docker</span> create <span class="token punctuation">[</span>options<span class="token punctuation">]</span> IMAGE
|
||||
</span><span class="code-line line-number" line="2"> -a, <span class="token parameter variable">--attach</span> <span class="token comment"># 附加标准输出/错误</span>
|
||||
</span><span class="code-line line-number" line="3"> -i, <span class="token parameter variable">--interactive</span> <span class="token comment"># 附加标准输入(交互式)</span>
|
||||
@ -202,10 +202,10 @@
|
||||
</span><span class="code-line line-number" line="10"> -v, <span class="token parameter variable">--volume</span> <span class="token variable"><span class="token variable">`</span><span class="token builtin class-name">pwd</span><span class="token variable">`</span></span>:/app <span class="token comment"># mount(需要绝对路径)</span>
|
||||
</span><span class="code-line line-number" line="11"> -e, <span class="token parameter variable">--env</span> <span class="token assign-left variable">NAME</span><span class="token operator">=</span>hello <span class="token comment"># 环境变量 env vars</span>
|
||||
</span></code></pre>
|
||||
</div></div><div class="h3wrap-body"><div class="wrap"><div class="wrap-header h4wrap"><h4>实例</h4><div class="wrap-body">
|
||||
</div></div><div class="h3wrap-body"><div class="wrap"><div class="wrap-header h4wrap"><h4 id="实例"><a aria-hidden="true" tabindex="-1" href="#实例"><span class="icon icon-link"></span></a>实例</h4><div class="wrap-body">
|
||||
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">$ <span class="token function">docker</span> create <span class="token parameter variable">--name</span> my_redis <span class="token parameter variable">--expose</span> <span class="token number">6379</span> redis:3.0.2
|
||||
</span></code></pre>
|
||||
</div></div></div></div></div><div class="wrap"><div class="wrap-header h3wrap"><h3>操控</h3><div class="wrap-body">
|
||||
</div></div></div></div></div><div class="wrap"><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 line-number" line="1"><span class="token function">docker</span> <span class="token function">rename</span> my-nginx nginx-server
|
||||
</span></code></pre>
|
||||
@ -215,8 +215,8 @@
|
||||
<p>更新容器</p>
|
||||
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">docker</span> update --cpu-shares <span class="token number">512</span> <span class="token parameter variable">-m</span> 300M nginx-server
|
||||
</span></code></pre>
|
||||
</div></div></div></div></div><div class="wrap"><div class="wrap-header h2wrap"><h2>Docker 镜像</h2><div class="wrap-body"><!--rehype:body-class=cols-2-->
|
||||
</div></div><div class="h2wrap-body cols-2"><div class="wrap"><div class="wrap-header h3wrap"><h3>操控</h3><div class="wrap-body">
|
||||
</div></div></div></div></div><div class="wrap"><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-->
|
||||
</div></div><div class="h2wrap-body cols-2"><div class="wrap"><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">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@ -263,7 +263,7 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div></div></div><div class="wrap"><div class="wrap-header h3wrap"><h3>构建镜像</h3><div class="wrap-body">
|
||||
</div></div></div><div class="wrap"><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 line-number" line="1">$ <span class="token function">docker</span> build <span class="token builtin class-name">.</span>
|
||||
</span><span class="code-line line-number" line="2">$ <span class="token function">docker</span> build github.com/creack/docker-firefox
|
||||
</span><span class="code-line line-number" line="3">$ <span class="token function">docker</span> build - <span class="token operator"><</span> Dockerfile
|
||||
@ -272,8 +272,8 @@
|
||||
</span><span class="code-line line-number" line="6">$ <span class="token function">docker</span> build <span class="token parameter variable">-f</span> myOtherDockerfile <span class="token builtin class-name">.</span>
|
||||
</span><span class="code-line line-number" line="7">$ <span class="token function">curl</span> example.com/remote/Dockerfile <span class="token operator">|</span> <span class="token function">docker</span> build <span class="token parameter variable">-f</span> - <span class="token builtin class-name">.</span>
|
||||
</span></code></pre>
|
||||
</div></div></div></div></div><div class="wrap"><div class="wrap-header h2wrap"><h2>Docker 网络</h2><div class="wrap-body"><!--rehype:body-class=cols-2-->
|
||||
</div></div><div class="h2wrap-body cols-2"><div class="wrap"><div class="wrap-header h3wrap"><h3>操作</h3><div class="wrap-body">
|
||||
</div></div></div></div></div><div class="wrap"><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-->
|
||||
</div></div><div class="h2wrap-body cols-2"><div class="wrap"><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 line-number" line="1"><span class="token function">docker</span> network <span class="token function">rm</span> MyOverlayNetwork
|
||||
</span></code></pre>
|
||||
@ -292,7 +292,7 @@
|
||||
<p>断开容器与网络的连接</p>
|
||||
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">docker</span> network disconnect MyOverlayNetwork nginx
|
||||
</span></code></pre>
|
||||
</div></div></div><div class="wrap"><div class="wrap-header h3wrap"><h3>创建网络</h3><div class="wrap-body">
|
||||
</div></div></div><div class="wrap"><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 line-number" line="1"><span class="token function">docker</span> network create <span class="token parameter variable">-d</span> overlay MyOverlayNetwork
|
||||
</span><span class="code-line line-number" line="2"><span class="token function">docker</span> network create <span class="token parameter variable">-d</span> bridge MyBridgeNetwork
|
||||
</span><span class="code-line line-number" line="3"><span class="token function">docker</span> network create <span class="token parameter variable">-d</span> overlay <span class="token punctuation">\</span>
|
||||
@ -307,8 +307,8 @@
|
||||
</span><span class="code-line line-number" line="12"> --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 line-number" line="13"> MyOverlayNetwork
|
||||
</span></code></pre>
|
||||
</div></div></div></div></div><div class="wrap"><div class="wrap-header h2wrap"><h2>各种各样的</h2><div class="wrap-body"><!--rehype:body-class=cols-2-->
|
||||
</div></div><div class="h2wrap-body cols-2"><div class="wrap"><div class="wrap-header h3wrap"><h3>Docker Hub</h3><div class="wrap-body">
|
||||
</div></div></div></div></div><div class="wrap"><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-->
|
||||
</div></div><div class="h2wrap-body cols-2"><div class="wrap"><div class="wrap-header h3wrap"><h3 id="docker-hub"><a aria-hidden="true" tabindex="-1" href="#docker-hub"><span class="icon icon-link"></span></a>Docker Hub</h3><div class="wrap-body">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@ -335,7 +335,7 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div></div></div><div class="wrap row-span-3"><div class="wrap-header h3wrap"><h3>注册表命令</h3><div class="wrap-body"><!--rehype:wrap-class=row-span-3-->
|
||||
</div></div></div><div class="wrap 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 line-number" line="1">$ <span class="token function">docker</span> login
|
||||
</span><span class="code-line line-number" line="2">$ <span class="token function">docker</span> login localhost:8080
|
||||
@ -356,7 +356,7 @@
|
||||
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">$ <span class="token function">docker</span> push eon01/nginx
|
||||
</span><span class="code-line line-number" line="2">$ <span class="token function">docker</span> push eon01/nginx localhost:5000/myadmin/nginx
|
||||
</span></code></pre>
|
||||
</div></div></div><div class="wrap"><div class="wrap-header h3wrap"><h3>批量清除</h3><div class="wrap-body">
|
||||
</div></div></div><div class="wrap"><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">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@ -379,7 +379,7 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div></div></div><div class="wrap"><div class="wrap-header h3wrap"><h3>卷 volume</h3><div class="wrap-body">
|
||||
</div></div></div><div class="wrap"><div class="wrap-header h3wrap"><h3 id="卷-volume"><a aria-hidden="true" tabindex="-1" href="#卷-volume"><span class="icon icon-link"></span></a>卷 volume</h3><div class="wrap-body">
|
||||
<p>检查卷</p>
|
||||
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">$ <span class="token function">docker</span> volume <span class="token function">ls</span>
|
||||
</span></code></pre>
|
||||
|
Reference in New Issue
Block a user