Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Servers, nginx and Docker

Docker refuses a Windows image on this machine

Errorimage operating system "windows" cannot be used on this platform

Short 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.

  • Applies to Docker Desktop 4.x for Windows, Windows 11 Pro
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 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 version
  2. 2Match what you see, then jump to its fix

    1. 1Server OS/Arch in docker version starts with linux, and you are on Windows Pro or EnterpriseDocker Desktop is in Linux containers modeFix
    2. 2the switch option is missing, or you are on Linux or macOSWindows containers are not available on this edition or hostFix

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 version

2Fix

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 containers

3Verify

The Engine OS/Arch under Server in docker version now starts with windows, and the pull works.

docker version

Confirmed by docs.docker.com

Did this fix it?

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 version

2Fix

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 version

Confirmed by docs.docker.com

Did this fix it?

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

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.