WARNING: The requested image's platform (linux/arm64/v8) does not match the detected host
platform (linux/amd64/v3) and no specific platform was requested means the only copy of
the image on your machine was built for another CPU, here ARM on an x86-64 PC. The container
still ran, under emulation. Run it with --platform linux/amd64 to get the
native variant.
It is a warning, not an error: the command printed aarch64 and exited 0. With
--platform linux/amd64 Docker pulled the x86-64 variant of the same tag and the
warning was gone.
The error
PS> docker pull --platform linux/arm64 busybox:1.36
...
PS> docker tag busybox:1.36 fix9-run-busybox:arm64
...
PS> docker run --rm --name fix9-run-arm fix9-run-busybox:arm64 uname -m
WARNING: The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64/v3) and no specific platform was requested
aarch64
Why it happens
The engine on this PC reports linux/amd64. The image had been pulled with
--platform linux/arm64. When docker run was given no platform and
found only the arm64 variant locally, it used that one, warned, and ran it: uname
-m printed aarch64, the ARM name, on an x86-64 machine, so Docker Desktop
was emulating the ARM CPU.
Asking for arm64 on purpose silences the warning and changes nothing else:
PS> docker run --rm --name fix9-run-arm --platform linux/arm64 fix9-run-busybox:arm64 uname -m
aarch64
The fix
PS> docker run --rm --name fix9-run-amd --platform linux/amd64 busybox:1.36 uname -m
Unable to find image 'busybox:1.36' locally
1.36: Pulling from library/busybox
...
Status: Image is up to date for busybox:1.36
x86_64
Docker pulled the amd64 variant of the same tag and ran it natively. Afterwards
docker image ls --tree busybox:1.36 listed both linux/amd64 and
linux/arm64/v8 with disk usage under the one tag, and a plain docker
run without --platform printed x86_64 with no warning.
One surprise from the test: the local tag fix9-run-busybox:arm64 pointed at the
same image, so once the amd64 variant was there, it too printed x86_64. A tag
name that says "arm64" does not choose the platform; --platform does. Asking a local-only
tag for a platform it does not have fails: --platform linux/amd64 on
fix9-run-busybox:arm64, before the amd64 pull, gave pull access denied for
fix9-run-busybox, repository does not exist or may require 'docker login'. Use the
original name, busybox:1.36, when you ask for another platform.
How it was reproduced
On Windows 11 with Docker Desktop, engine and client 29.9.3 (server linux/amd64,
containerd image store), from Windows PowerShell 5.1. No busybox image was on the machine
before. The test pulled busybox:1.36 for linux/arm64, tagged it
fix9-run-busybox:arm64, ran it without and with --platform, then
ran busybox:1.36 with --platform linux/amd64. Both tags were removed
at the end; the tag names are the test's own.
Frequently asked
- Does the platform does not match warning stop the container?
- No. In this test the arm64 container ran on an x86-64 PC, printed aarch64 and exited 0. It ran under emulation.
- How do I get rid of the requested image's platform warning?
- Run with --platform linux/amd64 to use or pull the native variant, or with --platform linux/arm64 if you want the ARM image on purpose. Both removed the warning here.
- How do I see which platforms of an image I have locally?
- On this engine, docker image ls --tree followed by the image name listed every platform of the tag, with disk usage for the variants that were pulled.
More decoded errors in the Fixes category. What Docker Desktop runs under the hood on Windows: Docker for .NET developers, Part 1.