Description
Commands, such as docker image inspect and docker image rm default to use the default platform. If the default platform is not present for an image, the command fails.
Reproduce
Make sure no image is present:
docker image rm busybox:latest
Pull the image for a platform that's not the default:
docker image pull --platform=linux/s390x busybox:latest
59f225fdf34f: Download complete
8e8f614949c5: Download complete
8460717a482e: Download complete
53b6cfce1626: Download complete
docker.io/library/busybox:latest
Verify that the image is present:
docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
busybox latest 59f225fdf34f About a minute ago 2.01MB
Try to remove or inspect the image:
docker image rm busybox:latest
Error: No such image: busybox:latest
docker image rm 59f225fdf34f
Error: No such image: busybox:latest
docker image inspect busybox:latest
[]
Error: No such image: busybox:latest
Workaround: to remove or inspect the image, pull the default platform:
docker image pull busybox:latest
59f225fdf34f: Exists
e68659cdc5b2: Download complete
73a648b1404c: Download complete
3e32979327a9: Download complete
docker.io/library/busybox:latest
docker image rm busybox:latest
Untagged: docker.io/library/busybox:latest
Expected behavior
Interacting with the image to work
A "quick fix" would be to pick the first available architecture if the default is not available, but we need to look at a better UX (I'm writing up some ideas for that).
docker version
Client:
Cloud integration: v1.0.29
Version: 20.10.21
API version: 1.41
Go version: go1.18.7
Git commit: baeda1f
Built: Tue Oct 25 18:01:18 2022
OS/Arch: darwin/arm64
Context: default
Experimental: true
Server: Docker Desktop 4.15.0 (93002)
Engine:
Version: 22.06.0-beta.0-902-g2708be0db4.m
API version: 1.43 (minimum version 1.12)
Go version: go1.18.4
Git commit: 2708be0db4
Built: Wed Nov 23 09:32:50 2022
OS/Arch: linux/arm64
Experimental: true
containerd:
Version: 1.6.10
GitCommit: 770bd0108c32f3fb5c73ae1264f7e503fe7b2661
runc:
Version: 1.1.4
GitCommit: v1.1.4-0-g5fd4c4d
docker-init:
Version: 0.19.0
GitCommit: de40ad0
docker info
Client:
Context: default
Debug Mode: false
Plugins:
base: Identify base image (Docker Inc., vn/a)
buildx: Docker Buildx (Docker Inc., v0.9.1)
compose: Docker Compose (Docker Inc., v2.13.0)
dev: Docker Dev Environments (Docker Inc., v0.0.5)
extension: Manages Docker extensions (Docker Inc., v0.2.16)
sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
scan: Docker Scan (Docker Inc., v0.22.0)
shell: Open a browser shell on the Docker Host. (thaJeztah, v0.0.1)
Server:
Containers: 48
Running: 12
Paused: 0
Stopped: 36
Images: 11
Server Version: 22.06.0-beta.0-902-g2708be0db4.m
Storage Driver: stargz
driver-type: io.containerd.snapshotter.v1
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: active
NodeID: bfpr7gj1w767qwq37qta7kqts
Is Manager: true
ClusterID: crv7mpxcck85em4ocnfci4esi
Managers: 1
Nodes: 1
Default Address Pool: 10.0.0.0/8
SubnetSize: 24
Data Path Port: 4789
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 10
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Force Rotate: 0
Autolock Managers: false
Root Rotation In Progress: false
Node Address: 192.168.65.3
Manager Addresses:
192.168.65.3:2377
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 770bd0108c32f3fb5c73ae1264f7e503fe7b2661
runc version: v1.1.4-0-g5fd4c4d
init version: de40ad0
Security Options:
seccomp
Profile: builtin
cgroupns
Kernel Version: 5.15.49-linuxkit
Operating System: Docker Desktop
OSType: linux
Architecture: aarch64
CPUs: 5
Total Memory: 5.8GiB
Name: docker-desktop
ID: c8ca0b32-cd5f-4ad2-9a97-bc30ebe413d4
Docker Root Dir: /var/lib/docker
Debug Mode: false
HTTP Proxy: http.docker.internal:3128
HTTPS Proxy: http.docker.internal:3128
No Proxy: hubproxy.docker.internal
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
hubproxy.docker.internal:5000
127.0.0.0/8
Live Restore Enabled: false
Additional Info
This is on Docker Desktop 4.15 with containerd integration enabled
Description
Commands, such as
docker image inspectanddocker image rmdefault to use the default platform. If the default platform is not present for an image, the command fails.Reproduce
Make sure no image is present:
Pull the image for a platform that's not the default:
Verify that the image is present:
Try to remove or inspect the image:
Workaround: to remove or inspect the image, pull the default platform:
Expected behavior
Interacting with the image to work
A "quick fix" would be to pick the first available architecture if the default is not available, but we need to look at a better UX (I'm writing up some ideas for that).
docker version
docker info
Additional Info
This is on Docker Desktop 4.15 with containerd integration enabled