-
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
docker rmi <image:tag> deletes both amd64 and arm64 builds on Apple Silicon #4980
Comments
Thanks! This is due to how we model images with the containerd image store - image targets the manifest-list/OCI-index directly and not individual platform-specific image manifests. In the meantime, you might want to upgrade to the 26.0 version which has a slight change to |
Description
I have an image built for both linux/amd64, and linux/arm64 on my system. I wish to delete only one of the builds and keep the other, however docker rmi deletes both of them.
I tried the following:
Running docker rmi within an x86 shell (that was launched as arch -x86_64 $SHELL)
Running docker with the flag DOCKER_DEFAULT_PLATFORM=linux/amd64 in both x86 shell and arm shell.
Reproduce
On an ARM machine, run:
docker pull hello-world
Then run
docker pull --platform=linux/amd64 hello-world
.Then run run docker rmi with
DOCKER_DEFAULT_PLATFORM=linux/amd64
variable, or inside an x86 shell. Docker will remove both the images.Expected behavior
docker rmi
should remove image for the specified platform.docker version
Client: Cloud integration: v1.0.35+desktop.11 Version: 25.0.3 API version: 1.44 Go version: go1.21.6 Git commit: 4debf41 Built: Tue Feb 6 21:13:26 2024 OS/Arch: darwin/arm64 Context: desktop-linux Server: Docker Desktop 4.28.0 (139021) Engine: Version: 25.0.3 API version: 1.44 (minimum version 1.24) Go version: go1.21.6 Git commit: f417435e5f6216828dec57958c490c4f8bae4f98 Built: Wed Feb 7 00:39:16 2024 OS/Arch: linux/arm64 Experimental: false containerd: Version: 1.6.28 GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bb runc: Version: 1.1.12 GitCommit: v1.1.12-0-g51d5e94 docker-init: Version: 0.19.0 GitCommit: de40ad0
docker info
Additional Info
For some reason, the image id for both the images is same, even though there's a size difference. These are logs from an arm machine (Apple M3, Sonoma)
I ran the same experiment on my Linux machine where I see a completely different picture:
I am super curious as to why this difference both in image ids and image sizes exists on the two machines. I guess the image id being the same would explain in a way why docker rmi deletes both the builds.
The text was updated successfully, but these errors were encountered: