doc-exports/docs/swr/umn/swr_faq_0004.html
Dong, Qiu Jian cdb1e8ffdd SWR UMN initial version reuploaded -20221102
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Dong, Qiu Jian <qiujiandong1@huawei.com>
Co-committed-by: Dong, Qiu Jian <qiujiandong1@huawei.com>
2022-11-10 10:19:05 +00:00

29 lines
1.3 KiB
HTML

<a name="swr_faq_0004"></a><a name="swr_faq_0004"></a>
<h1 class="topictitle1">How Do I Create an Image Package?</h1>
<div id="body1511745461982"><p id="swr_faq_0004__p873464222010">Run the <strong id="swr_faq_0004__b842352706165123">docker save</strong> command to compress the container image into a .tar or .tar.gz package. The command format is as follows: </p>
<p id="swr_faq_0004__p1857014262113"><strong id="swr_faq_0004__b14571174216210">docker save [OPTIONS] IMAGE [IMAGE...]</strong></p>
<p id="swr_faq_0004__p05711425212"><strong id="swr_faq_0004__b121135711146">[OPTIONS]</strong> can be set to <strong id="swr_faq_0004__b1611837131414">--output</strong> or <strong id="swr_faq_0004__b8119275147">-o</strong>, indicating that the image is exported to a file.</p>
<p id="swr_faq_0004__p183391546122116">Example: </p>
<pre class="screen" id="swr_faq_0004__screen167864518337">$ docker save nginx:latest &gt; nginx.tar
$ ls -sh nginx.tar
108M nginx.tar
$ docker save php:5-apache &gt; php.tar.gz
$ ls -sh php.tar.gz
372M php.tar.gz
$ docker save --output nginx.tar nginx
$ ls -sh nginx.tar
108M nginx.tar
$ docker save -o nginx-all.tar nginx
$ docker save -o nginx-latest.tar nginx:latest</pre>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="swr_faq_1001.html">General FAQs</a></div>
</div>
</div>