uTools-Manuals/docs/docker/docker history.html
2019-05-07 10:37:34 +08:00

27 lines
1.2 KiB
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 history 命令</h1>
<p><strong>docker history : </strong>查看指定镜像的创建历史。</p>
<h3>语法</h3>
<pre><code class="language-Docker">docker history [OPTIONS] IMAGE</code></pre>
<p>OPTIONS说明</p>
<ul>
<li><p><strong>-H :</strong>以可读的格式打印镜像大小和日期默认为true</p><p></p></li>
<li><p><strong>--no-trunc :</strong>显示完整的提交记录;</p><p></p></li>
<li><p><strong>-q :</strong>仅列出提交记录ID。</p><p></p></li>
</ul>
<h3>实例</h3>
<p>查看本地镜像runoob/ubuntu:v3的创建历史。</p>
<pre><code class="language-Docker">
root@runoob:~# docker history runoob/ubuntu:v3
IMAGE CREATED CREATED BY SIZE COMMENT
4e3b13c8a266 3 months ago /bin/sh -c #(nop) CMD ["/bin/bash"] 0 B
&lt;missing&gt; 3 months ago /bin/sh -c sed -i 's/^#\s*\(deb.*universe\)$/ 1.863 kB
&lt;missing&gt; 3 months ago /bin/sh -c set -xe &amp;&amp; echo '#!/bin/sh' &gt; /u 701 B
&lt;missing&gt; 3 months ago /bin/sh -c #(nop) ADD file:43cb048516c6b80f22 136.3 MB
</code></pre>