Skip to content

Commit

Permalink
doc: update docker.md (#313)
Browse files Browse the repository at this point in the history
* add bash debug info

* Add some additional notes 32af22a
  • Loading branch information
jaywcjlove committed Feb 26, 2023
1 parent 2e683d8 commit f330905
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 46 deletions.
78 changes: 39 additions & 39 deletions CONTRIBUTORS.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions docs/docker.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
</span></code></pre>
<hr>
<ul>
<li><code>-d</code> - 以分离模式运行容器</li>
<li><code>-p 80:80</code> - 将端口 80 映射到容器中的端口 80</li>
<li><code>-d</code> - 以分离(后台)模式运行容器</li>
<li><code>-p 80:80</code> - 将端口 80 映射到容器中的端口 80,格式:宿主机端口:容器端口</li>
<li><code>docker/getting-started</code> - 要使用的镜像</li>
</ul>
<p>在前台创建并运行容器</p>
<p>在前台创建并运行容器(之后如果要退出容器但是不关闭容器,按<em>Ctrl+P+Q</em>即可)</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">-p</span> <span class="token parameter variable">--rm</span> <span class="token number">8001</span>:8080 <span class="token parameter variable">--name</span> my-nginx nginx
</span></code></pre>
<hr>
Expand Down Expand Up @@ -285,7 +285,8 @@ <h4 id="实例"><a aria-hidden="true" tabindex="-1" href="#实例"><span class="

<table><thead><tr><th><code>Example</code></th><th>Description</th></tr></thead><tbody><tr><td><code>docker images</code></td><td>列出镜像</td></tr><tr><td><code>docker rmi nginx</code></td><td>删除镜像</td></tr><tr><td><code>docker load &#x3C; ubuntu.tar.gz</code></td><td>加载一个 tarred 存储库</td></tr><tr><td><code>docker load --input ubuntu.tar</code></td><td>加载一个 tarred 存储库</td></tr><tr><td><code>docker save busybox > ubuntu.tar</code></td><td>将镜像保存到 tar 存档</td></tr><tr><td><code>docker history</code></td><td>显示镜像的历史</td></tr><tr><td><code>docker commit nginx my_nginx</code></td><td>将容器另存为镜像</td></tr><tr><td><code>docker tag nginx eon01/nginx</code></td><td>标记镜像</td></tr><tr><td><code>docker push eon01/nginx</code></td><td>推送镜像</td></tr></tbody></table>
</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> build <span class="token builtin class-name">.</span>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line"><span class="token comment"># 注意有的最后面是英文 .</span>
</span><span class="code-line">$ <span class="token function">docker</span> build <span class="token builtin class-name">.</span>
</span><span class="code-line">$ <span class="token function">docker</span> build github.com/creack/docker-firefox
</span><span class="code-line">$ <span class="token function">docker</span> build - <span class="token operator">&#x3C;</span> Dockerfile
</span><span class="code-line">$ <span class="token function">docker</span> build - <span class="token operator">&#x3C;</span> context.tar.gz
Expand Down
9 changes: 6 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -856,15 +856,18 @@
<a href="https://github.com/hi-liyan" title="Yan Li">
<img src="https://avatars.githubusercontent.com/u/40056492?v=4" width="42;" alt="Yan Li">
</a>
<a href="https://github.com/yikuaibro" title="YuGan">
<img src="https://avatars.githubusercontent.com/u/44493045?v=4" width="42;" alt="YuGan">
<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/y52y" title="Zyj">
<img src="https://avatars.githubusercontent.com/u/51304324?v=4" width="42;" alt="Zyj">
</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/chaos-cn" title="chaos">
<img src="https://avatars.githubusercontent.com/u/71205599?v=4" width="42;" alt="chaos">
</a>
<a href="https://github.com/chyok" title="chyok">
<img src="https://avatars.githubusercontent.com/u/32629225?v=4" width="42;" alt="chyok">
</a>
Expand Down Expand Up @@ -1088,7 +1091,7 @@
<!--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>

</div></div><div class="h2wrap-body"></div></div></div></div><footer class="footer-wrap"><footer class="max-container">© 2022 Kenny Wang. Updated on 2023/02/26 21:59:29</footer></footer><script src="data.js" defer></script><script src="js/fuse.min.js" defer></script><script src="js/main.js" 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 Kenny Wang. Updated on 2023/02/26 22:51:22</footer></footer><script src="data.js" defer></script><script src="js/fuse.min.js" defer></script><script src="js/main.js" 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>
</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>

0 comments on commit f330905

Please sign in to comment.