Skip to content
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

Support for Multiple Architectures in Docker Desktop Image Pull #772

Open
FreemanKevin opened this issue Jan 2, 2025 · 7 comments
Open
Assignees
Labels
community_new New idea raised by a community contributor

Comments

@FreemanKevin
Copy link

Tell us about your request
A clear and concise description of what you want to happen or the change you would like to see:
I would like Docker Desktop to support the storage of multi-architecture images without automatic overwriting, similar to how Docker Hub handles it. This would allow users to manage and use images for different architectures without losing data.

Which service(s) is this request for?
Let us know which product(s) you want this for:
This request is for Docker Desktop.

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]:
When pulling images in Docker Desktop that support multiple architectures, the images are automatically overwritten, allowing only one tag to be saved. This makes it difficult to manage and use images for different architectures, as they cannot coexist.

Are you currently working around the issue?
A clear and concise description of any alternative solutions or features you've considered or are using today:
Currently, there is no workaround to this issue other than manually managing images outside of Docker Desktop, which is not convenient. Using Docker Hub for multi-architecture image storage is also not integrated seamlessly with Docker Desktop.

Additional context
Add any other context or screenshots about the feature request here:
N/A

@FreemanKevin FreemanKevin added the community_new New idea raised by a community contributor label Jan 2, 2025
@nicks
Copy link

nicks commented Jan 2, 2025

good news! this exists today; it's just hidden under an option - https://docs.docker.com/desktop/features/containerd/

@FreemanKevin
Copy link
Author

@nicks It doesn't seem to work, and it feels like the situation is even worse. Before, it would just overwrite the same-name tag, but the two different architecture images would still be saved. Now that I've switched to containerd, I can only save images for one architecture.

IS@PC-20241119 MINGW64 ~/Desktop
$ docker pull --platform=linux/arm64 nginx:1.27.3
1.27.3: Pulling from library/nginx
a8066ea4829b: Pulling fs layer
b5368be906ec: Pulling fs layer
aafc2e219c20: Pulling fs layer
755bf136756e: Pulling fs layer
261c6a94b398: Pulling fs layer
bdb964b66a74: Pulling fs layer
f5c6876bb3d7: Pulling fs layer
a8066ea4829b: Download complete
b5368be906ec: Download complete
755bf136756e: Download complete
261c6a94b398: Download complete
aafc2e219c20: Download complete
f5c6876bb3d7: Download complete
bdb964b66a74: Download complete
Digest: sha256:42e917aaa1b5bb40dd0f6f7f4f857490ac7747d7ef73b391c774a41a8b994f15
Status: Downloaded newer image for nginx:1.27.3
docker.io/library/nginx:1.27.3

IS@PC-20241119 MINGW64 ~/Desktop
$ docker images
REPOSITORY   TAG       IMAGE ID       CREATED       SIZE
nginx        1.27.3    42e917aaa1b5   5 weeks ago   280MB

IS@PC-20241119 MINGW64 ~/Desktop
$ docker inspect nginx:1.27.3 | grep Architecture
        "Architecture": "arm64",

IS@PC-20241119 MINGW64 ~/Desktop
$ docker pull nginx:1.27.3
1.27.3: Pulling from library/nginx
c44f27309ea1: Pulling fs layer
fd674058ff8f: Pulling fs layer
1e109dd2a0d7: Pulling fs layer
2b99b9c5d9e5: Pulling fs layer
566e42bcee1c: Pulling fs layer
bd98674871f5: Pulling fs layer
da8cc133ff82: Pulling fs layer
c44f27309ea1: Download complete
1e109dd2a0d7: Download complete
bd98674871f5: Download complete
2b99b9c5d9e5: Download complete
da8cc133ff82: Download complete
fd674058ff8f: Download complete
566e42bcee1c: Download complete
Digest: sha256:42e917aaa1b5bb40dd0f6f7f4f857490ac7747d7ef73b391c774a41a8b994f15
Status: Image is up to date for nginx:1.27.3
docker.io/library/nginx:1.27.3

IS@PC-20241119 MINGW64 ~/Desktop
$ docker inspect nginx:1.27.3 | grep Architecture
        "Architecture": "amd64",

Image
Image
Image

@nicks
Copy link

nicks commented Jan 3, 2025

ya, that's why it's marked as experimental, not all commands have the --platform flag yet, there's work being tracked on it here - moby/moby#47680

@FreemanKevin
Copy link
Author

Okay, looking forward to this feature

@thaJeztah
Copy link
Member

Inspect is being worked on (and hopefully will ship with docker engine v28), but there's already an option to show the underlying variants that are present on docker image ls / docker images using the --tree option;

docker pull --platform=linux/arm64 nginx:1.27.3
# ...

docker pull --platform=linux/amd64 nginx:1.27.3
# ...

docker image ls --tree nginx:1.27.3

IMAGE                   ID             DISK USAGE   CONTENT SIZE   IN USE
nginx:1.27.3            42e917aaa1b5        558MB          141MB
├─ linux/amd64          c375ae41bb29        278MB         72.1MB
├─ linux/arm/v5         196f9bcafacd           0B             0B
├─ linux/arm/v7         40bf717e70da           0B             0B
├─ linux/arm64/v8       7a11619197f4        280MB         68.5MB
├─ linux/386            70ff939a0a50           0B             0B
├─ linux/mips64le       f8e9e0906e78           0B             0B
├─ linux/ppc64le        beaa21f47598           0B             0B
└─ linux/s390x          22b5b11f3afe           0B             0B

@FreemanKevin
Copy link
Author

This is very good. I am looking forward to it. Has it been implemented? I will try it with Windows at work tomorrow.

@thaJeztah
Copy link
Member

It's not yet done for native Windows containers, for those we don't use containerd as runtime currently

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community_new New idea raised by a community contributor
Projects
None yet
Development

No branches or pull requests

4 participants