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

17 lines
617 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 export 命令</h1>
<p><strong>docker export :</strong>将文件系统作为一个tar归档文件导出到STDOUT。</p>
<h3>语法</h3>
<pre><code class="language-Docker">docker export [OPTIONS] CONTAINER</code></pre>
<p>OPTIONS说明</p>
<ul>
<li><p><strong>-o :</strong>将输入内容写到文件。</p></li>
</ul>
<h3>实例</h3>
<p>将id为a404c6c174a2的容器按日期保存为tar文件。</p>
<pre><code class="language-Docker">runoob@runoob:~$ docker export -o mysql-`date +%Y%m%d`.tar a404c6c174a2
runoob@runoob:~$ ls mysql-`date +%Y%m%d`.tar
mysql-20160711.tar
</code></pre>