简体   繁体   English

在AWS ECR上更改Docker映像大小

[英]Docker image size changed on aws ecr

i just uploaded docker image to aws ecr. 我刚刚将docker映像上传到了AWS ECR。 my actual docker image locally is 927 MB while on ECR it is showing 321 MB 我在本地的实际docker映像为927 MB,而在ECR上显示为321 MB

is there anything i am missing to read during documentation ? 在文档编制过程中我有什么想念的东西吗?

i have uploaded image is proper with tag name but size change is there 我上传的图片带有标签名称是正确的,但是有尺寸变化

This is due to how docker client acts before it pushes the image to ECR, So the size on the ECR dashboard is a size for a compressed version of your image as documented : 这是由于Docker客户端在将映像推送到ECR之前的行为,因此ECR仪表板上的大小是映像压缩版本的大小,如记录所示

Beginning with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2 Docker registry. 从Docker版本1.9开始,Docker客户端先压缩图像层,然后再将其推送到V2 Docker注册表。 The output of the docker images command shows the uncompressed image size, so it may return a larger image size than the image sizes shown in the AWS Management Console. docker images命令的输出显示未压缩的图像大小,因此它可能返回比AWS管理控制台中显示的图像大小更大的图像大小。

Before few time ago aws was not showing the size option at ECR service now it is availble but 不久前,aws并未在ECR服务上显示size选项,但现在可用

from aws side it is compressing images or something else to ECR when i pulled my image to local machine and checked size it was same as older one i have created locally. 从aws端来看,当我将映像拉到本地计算机并检查其大小与我在本地创建的旧映像相同时,它正在将映像或其他内容压缩到ECR。

So aws ecr is showing compressed size or may be some bug but docker image is working absolutely fine. 因此,aws ecr显示压缩的大小,或者可能是一些错误,但docker image绝对正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM