Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker - image operating system "windows" cannot be used on this platform

People also ask

Can I run Windows OS on Docker?

You can run both Linux and Windows programs and executables in Docker containers. The Docker platform runs natively on Linux (on x86-64, ARM and many other CPU architectures) and on Windows (x86-64).

What version of Windows does Docker support?

Docker only supports Docker Desktop on Windows for those versions of Windows 10 that are still within Microsoft's servicing timeline. Containers and images created with Docker Desktop are shared between all user accounts on machines where it is installed.

Can you run Windows 10 on Docker?

Docker for Windows runs on 64-bit Windows 10 Pro, Enterprise, and Education; 1511 November update, Build 10586 or later. Docker plans to support more versions of Windows 10 in the future.

Can I run Windows Docker container on Linux?

The Windows Docker Desktop has the feature of providing Linux Subsystem; and in this case, running Linux container can ultimately run on Windows. However, we should note that if this feature is enabled, only Linux containers can run while Windows containers cannot.


Your Docker host is configured to run Linux containers inside of a VM. To run Windows containers, you need to "Switch to Windows containers" in the Docker menu. Documentation on that is available here.


Enter image description here

Enter image description here


You need to go to the Taskbar → right click the Docker icon → use option Switch to Windows containers...

Source https://docs.docker.com/docker-for-windows/

Enter image description here


Switch to Windows Container needs to selected from docker icon running under hidden icon from the bottom right... The moment you switch from Linux to Windows or Windows to Linux, Docker daemon automatically restarts to consider switched container...


I would highly recommend you to view these 2 links to get more insight into how to create window containers:

  • Forum post

  • Blog post


I really found the content of these links very helpful to make a window container which is still being enhanced for the generic issue we are all are facing since support for window container is yet to mature like Linux containers!


microsoft/nanoserver is a windows native container image. So you cannot run this as linux containers run natively. It can only be run on windows 10 or windows server.

If you are in windows 10, you can switch to windows containers by selecting

switch to windows containers