doc-exports/docs/swr/umn/swr_faq_0005.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

22 lines
2.5 KiB
HTML

<a name="swr_faq_0005"></a><a name="swr_faq_0005"></a>
<h1 class="topictitle1">Why Is an Image Uploaded Through the Client to SWR Different in Size From One Uploaded Through the SWR Console?</h1>
<div id="body1512611895325"><div class="section" id="swr_faq_0005__section254724910217"><h4 class="sectiontitle">Symptom</h4><p id="swr_faq_0005__p0775145012219">Assume that a nginx image of v2.0.0 is created on the local Docker client. The <strong id="swr_faq_0005__b19132114295111">docker images</strong> command is run to query <strong id="swr_faq_0005__b18899145645111">SIZE</strong> of the image. The size is <strong id="swr_faq_0005__b7378101814572">22.8 MB</strong>.</p>
<pre class="screen" id="swr_faq_0005__screen29382402517">$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx v2.0.0 22f2bf2e2b4f 9 days ago <strong id="swr_faq_0005__b18736139763">22.8MB</strong></pre>
<ol id="swr_faq_0005__ol119274261473"><li id="swr_faq_0005__li1292812261071">Run the <strong id="swr_faq_0005__b15690133615216">docker push</strong> command to upload the image to SWR. The size of the image is <strong id="swr_faq_0005__b41828312564">9.5 MB</strong>.<p id="swr_faq_0005__p152571725111011"></p>
</li><li id="swr_faq_0005__li4681055142114">On the local Docker client, pack the image into a <strong id="swr_faq_0005__b658522214914">.tar</strong> package. Download the <strong id="swr_faq_0005__b1346619214534">nginx.tar</strong> package to the local host, and upload the package to SWR. The size of the package is <strong id="swr_faq_0005__b633017120567">23.2 MB</strong>.<p id="swr_faq_0005__p313414304147"></p>
</li></ol>
<p id="swr_faq_0005__p19617252961">The size of the image uploaded through the client is different from that of the image uploaded through the SWR console.</p>
</div>
<div class="section" id="swr_faq_0005__section758691341519"><h4 class="sectiontitle">Cause Analysis</h4><p id="swr_faq_0005__p554618169154">Image layers are compressed into <strong id="swr_faq_0005__b419816203518">.tgz</strong> packages when images are uploaded to SWR through the client, whereas when they are uploaded through the SWR console, they are only packed without being compressed. Therefore, the same image will be of different sizes when it is uploaded in these two different ways.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="swr_faq_1002.html">Image Management FAQs</a></div>
</div>
</div>