Docker refuses a Windows image on this machine
image operating system "windows" cannot be used on this platformShort answer
The image was built for Windows containers, and your Docker is running Linux containers. On Docker Desktop for Windows, switch to Windows containers from the tray menu. That works only on Windows Pro or Enterprise. Home editions, Linux and macOS can run Linux containers only, so the fix is to find a Linux image.
Fix it fast
1Find out which cause you have
Read the OS/Arch line under Server. It says which operating system the engine runs containers for. If it starts with linux and the image is a Windows one, the two do not match.
docker version2Match what you see, then jump to its fix
What does the error look like?
image operating system "windows" cannot be used on this platform
Cause 1 of 2
Docker Desktop is in Linux containers mode
1Check
Docker Desktop for Windows starts in Linux containers mode by default. The tray menu offers the other mode.
docker version2Fix
Open the Docker Desktop menu in the system tray and choose Switch to Windows containers. Switch back the same way when you need Linux containers again. Settings are kept separately for each mode.
# tray icon > Switch to Windows containers3Verify
The Engine OS/Arch under Server in docker version now starts with windows, and the pull works.
docker versionConfirmed by docs.docker.com
Cause 2 of 2
Windows containers are not available on this edition or host
1Check
Windows containers need Windows 10 or 11 Pro or Enterprise, and an all-users installation of Docker Desktop. Home and Education editions run Linux containers only, and Windows Server is not supported by Docker Desktop.
# Windows: Settings > System > About shows the edition
docker version2Fix
Use a Linux image of the same software if one exists, or run the Windows image on a Windows Pro or Enterprise machine. Reinstall Docker Desktop for all users if the edition is right but the option is missing.
docker pull <linux-image-of-the-same-software>3Verify
The Linux image pulls without the error, and the server OS/Arch in docker version still reads linux.
docker versionConfirmed by docs.docker.com
How do I stop it coming back?
- Check which operating systems an image tag supports before you pull it.
- Read the OS/Arch line of the server section in docker version when a pull behaves oddly.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
Related fixes
Servers
Docker warns that the image platform linux/amd64 does not match the arm64 host
The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8)
The image was built for linux/amd64 and your machine is arm64, such as an Apple Silicon Mac.
3 causes, each with a fixServers
apk cannot find py-pip in an Alpine Docker image
py-pip (no such package):
On current Alpine releases there is no package called py-pip.
2 causes, each with a fixServers
ng serve runs in the container but localhost:4200 does not open
The browser cannot open localhost:4200 although ng serve is running in the container
ng serve listens on localhost by default, which inside a container is the container itself.
3 causes, each with a fixServers
Angular routes return 404 from nginx when you refresh or open a link
The home page loads, but refreshing /some/route shows an nginx 404
Angular routes like /users/42 are not files, so nginx looks for them on disk and returns 404.
3 causes, each with a fixServers
AH00558: Apache in Docker cannot reliably determine its fully qualified domain name
Set the 'ServerName' directive globally to suppress this message
AH00558 is a warning, not a crash.
2 causes, each with a fixServers
Apache in a Docker container logs AH01114 when it proxies to a backend
AH01114: HTTP: failed to make connection to backend: api
Apache's proxy worker could not open a connection to the address in ProxyPass.
5 causes, each with a fix