-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With containerd, I pulled images debian, ubuntu, nginx all latest, using --platform=linux/arm64/v8 and multiple strange observations. #5523
Comments
@thaJeztah do you see this same on your setup.? |
Question 4. why we see 0B at multiple places #docker pull debian:latest
#docker images --tree
WARNING: This is an experimental feature. The output may change and shouldn't be depended on.
IMAGE ID DISK USAGE CONTENT SIZE USED
debian:latest 27586f460943 232MB 99.1MB Γ£ö
Γö£ΓöÇ linux/arm64/v8 4466c6813e1d 49.6MB 49.6MB
Γö£ΓöÇ linux/amd64 e225d70fafe8 182MB 49.6MB Γ£ö
Γö£ΓöÇ linux/arm/v5 baabbe93525e **0B 0B**
Γö£ΓöÇ linux/arm/v7 926de0d2617f **0B 0B**
Γö£ΓöÇ linux/386 f0d9b867cc9d **0B 0B**
Γö£ΓöÇ linux/mips64le a198b97962c6 0B 0B
Γö£ΓöÇ linux/ppc64le 47585ee2d5a4 0B 0B
ΓööΓöÇ linux/s390x 5245f9d6107f 0B 0B |
I tried reproducing this issue, but didn't get the same problem; docker pull --platform=linux/arm64/v8 nginx:latest && docker pull --platform=linux/arm64/v8 debian:latest && docker pull --platform=linux/arm64/v8 ubuntu:latest
latest: Pulling from library/nginx
14c9d9d19932: Download complete
c62fa0108604: Download complete
783efa720071: Download complete
66b98279bfb9: Download complete
e9346e20ffd2: Download complete
e0917afa5d8b: Download complete
e905ecdf6023: Download complete
Digest: sha256:d2eb56950b84efe34f966a2b92efb1a1a2ea53e7e93b94cdf45a27cf3cd47fc0
Status: Downloaded newer image for nginx:latest
docker.io/library/nginx:latest
latest: Pulling from library/debian
6d11c181ebb3: Download complete
Digest: sha256:27586f4609433f2f49a9157405b473c62c3cb28a581c413393975b4e8496d0ab
Status: Downloaded newer image for debian:latest
docker.io/library/debian:latest
latest: Pulling from library/ubuntu
25a614108e8d: Download complete
Digest: sha256:b359f1067efa76f37863778f7b6d0e8d911e3ee8efa807ad01fbf5dc1ef9006b
Status: Downloaded newer image for ubuntu:latest
docker.io/library/ubuntu:latest docker image ls --tree
WARNING: This is an experimental feature. The output may change and shouldn't be depended on.
IMAGE ID DISK USAGE CONTENT SIZE USED
nginx:latest d2eb56950b84 281MB 69.6MB
├─ linux/arm64/v8 96c43ba31637 281MB 69.6MB
├─ linux/amd64 396c6e925f28 0B 0B
├─ linux/arm/v5 583c1fe635d5 0B 0B
├─ linux/arm/v7 0c07ab67bdea 0B 0B
├─ linux/386 1608b0773886 0B 0B
├─ linux/mips64le 767d520bfd3e 0B 0B
├─ linux/ppc64le 5d944fb59cfb 0B 0B
└─ linux/s390x 708aae785214 0B 0B
debian:latest 27586f460943 205MB 49.6MB
├─ linux/arm64/v8 4466c6813e1d 205MB 49.6MB
├─ linux/amd64 e225d70fafe8 0B 0B
├─ linux/arm/v5 baabbe93525e 0B 0B
├─ linux/arm/v7 926de0d2617f 0B 0B
├─ linux/386 f0d9b867cc9d 0B 0B
├─ linux/mips64le a198b97962c6 0B 0B
├─ linux/ppc64le 47585ee2d5a4 0B 0B
└─ linux/s390x 5245f9d6107f 0B 0B
ubuntu:latest b359f1067efa 139MB 28.9MB
├─ linux/arm64/v8 1d392dca9b70 139MB 28.9MB
├─ linux/amd64 74f92a6b3589 0B 0B
├─ linux/arm/v7 4192b2c3b431 0B 0B
├─ linux/ppc64le 294858195461 0B 0B
├─ linux/riscv64 08d0f41b17da 0B 0B
└─ linux/s390x 48459f9f4d0b 0B 0B
Not sure about that one; did an error show up during the pull? Is there information in the daemon logs that may be relevant? I do notice some things in your setup;
Was this the first time the
That is currently a limitation; various commands were designed before multi-platform images existed, and only handle a single architecture. Currently that means that (e.g.) Work is in progress to improve this;
In both cases, the platform that was specified for the pull ( Multi-platform images are effectively a "bundle" of multiple variants of an image. When you pull the image, the registry resolves the name of the image to the wrapper, after which the Docker Engine pulls the platform variant(s) of the image (by default it pulls the daemon's "native" platform/architecture). By passing the
This is to indicate that the given variant of the image is not present in the daemon's image store. For example, in the output below, the IMAGE ID DISK USAGE CONTENT SIZE USED
debian:latest 27586f460943 205MB 49.6MB
├─ linux/arm64/v8 4466c6813e1d 205MB 49.6MB
├─ linux/amd64 e225d70fafe8 0B 0B
├─ linux/arm/v5 baabbe93525e 0B 0B
├─ linux/arm/v7 926de0d2617f 0B 0B
├─ linux/386 f0d9b867cc9d 0B 0B
├─ linux/mips64le a198b97962c6 0B 0B
├─ linux/ppc64le 47585ee2d5a4 0B 0B
└─ linux/s390x 5245f9d6107f 0B 0B After pulling another variant (I pulled IMAGE ID DISK USAGE CONTENT SIZE USED
debian:latest 27586f460943 383MB 97.5MB
├─ linux/s390x 5245f9d6107f 178MB 47.9MB
├─ linux/arm64/v8 4466c6813e1d 205MB 49.6MB
├─ linux/amd64 e225d70fafe8 0B 0B
├─ linux/arm/v5 baabbe93525e 0B 0B
├─ linux/arm/v7 926de0d2617f 0B 0B
├─ linux/386 f0d9b867cc9d 0B 0B
├─ linux/mips64le a198b97962c6 0B 0B
└─ linux/ppc64le 47585ee2d5a4 0B 0B The output currently shows size that's consumed locally, as that's been the information that's been relevant for most users (how much space does this image occupy on my machine?). We may be able to show the size of variants in the registry (i.e., "how much data would be downloaded if I pull this variant"), which may be relevant for some use-cases. There's some limitations to that because the registry only holds information about the compressed size of images ("content size"), but not the size used after extracting ("disk usage"). These are things that are still being discussed though; our goal is to provide sensible defaults (information most users are looking for), which may not always be all information. Some additional information may be added as an optional / customisable option, but also through other commands. For example, we're looking at providing a ☝️ feedback on the above is welcome; we're still designing some of these bits (which is also why the "WARNING: This is an experimental feature. The output may change and shouldn't be depended on." is shown). |
@thaJeztah is there a way to pick up arch specific image using imageId and not --platform flag while doing docker save? Is there a way to docker save using image id as below, I know I can do, |
@thaJeztah Thanks for the details above, I agree to your points, and I tried steps I mentioned in fresh Ubuntu and seems no issue. I understand --platform feature is on they way to be released in 28.0.0 No other solution than building image one by one platform specific and do docker save. or wait for 28.0.0 moby. |
I need to check up on that; I agree that is something that ideally would be supported. It's possible that some additional logic is needed on the daemon side to handle resolving variants based on that). Currently, resolving images by their ID is only done for the top-level image. If no match is found, it falls back to assuming it's an image reference; docker image save -o foo.tar 5245f9d6107f
Error response from daemon: No such image: 5245f9d6107f:latest I did a quick check as well if it would do better with the full digest, but doesn't look like it either; docker image save -o foo.tar 5245f9d6107f040e740721f86a1d74ca28e12dd9a073df7c5ba0490fdf394e4b
Error response from daemon: No such image: sha256:5245f9d6107f040e740721f86a1d74ca28e12dd9a073df7c5ba0490fdf394e4b
docker image save -o foo.tar sha256:5245f9d6107f040e740721f86a1d74ca28e12dd9a073df7c5ba0490fdf394e4b
Error response from daemon: No such image: sha256:5245f9d6107f040e740721f86a1d74ca28e12dd9a073df7c5ba0490fdf394e4b
docker image save -o foo.tar docker.io/library/debian@sha256:5245f9d6107f040e740721f86a1d74ca28e12dd9a073df7c5ba0490fdf394e4b
Error response from daemon: No such image: debian@sha256:5245f9d6107f040e740721f86a1d74ca28e12dd9a073df7c5ba0490fdf394e4b
docker image save -o foo.tar sha256:5245f9d6107f040e740721f86a1d74ca28e12dd9a073df7c5ba0490fdf394e4b
Error response from daemon: No such image: sha256:5245f9d6107f040e740721f86a1d74ca28e12dd9a073df7c5ba0490fdf394e4b I should probably check if there's a tracking ticket for that already, and if not, create one. |
I'm curious if there's a specific reason you need to save each variant separately; it should still be possible to save the image as a whole (multiple architectures), and load those into another engine (pushing to a registry is probably the more conventional way though). It's worth noting that saving an individual variant of an image "dismantles" the multi-platform image, which may also discard attestations / SBOMS (if present). We currently don't show those in the tree view, but some discussion on that is happening, and a PoC pull request was opened; |
Description
Questions
1. why ubuntu shows nothing in --tree command.
2. why arch of debian shows amd64?
4. why for debian both arch got pulled i.e. arm64 and amd64 but for nginx and ubuntu only linux/arm64/v8 got pulled?
Reproduce
.
Expected behavior
Questions
**1. why ubuntu shows nothing in --tree command.
Should show it downloaded.
why arch of debian shows amd64?
It should show arm64 because we pulled arm64.
why for debian both arch got pulled i.e. arm64 and amd64 but for nginx and ubuntu only linux/arm64/v8 got pulled?**
it should output in same way for all images, why it's different for different images.?
docker version
docker info
Additional Info
I see same behavior on docker desktop
The text was updated successfully, but these errors were encountered: