Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run a windows docker container on linux host?

can we run a windows docker container on linux host? also can take a RDP to windows docker container hosted on linux from other windows machines in the same network?

like image 656
Docgyan Avatar asked Mar 23 '16 07:03

Docgyan


People also ask

Can you run Windows in a Docker container?

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). Docker Inc. builds products that let you build and run containers on Linux, Windows and macOS.

How do I run a Windows program in a container?

First, open the container host you want to manage, and in the Tools pane, select the Containers extension. Then, select the Images tab inside the Container extension under Container Host. In the Pull Container Image settings, provide the image URL and the tag.

Can Docker run Linux containers?

That’s right. Docker for Windows can run Linux or Windows containers, with support for Linux containers via a Hyper-V Moby Linux VM (as of Docker for Windows 17.10 this VM is based on LinuxKit).

How do I run two Docker containers at the same time?

Docker -> Settings –> Daemon With Docker for Windows started and Windows containers selected, you can now run either Windows or Linux Containers simultaneously. The new –platform=linux command line switch is used to pull or start Linux images on Windows. Now start the Linux container and a Windows Server Core container.

Is it possible to run a Windows container on Linux?

"windows docker": if that means docker for windows, running Windows container, then no. You could run windows container on Linux the same way you are running Linux Container on windows: through a Virtual Machine emulating the target host. A docker-compose that handles both qemu and preinstalled isos might be possible.

Can I run Docker on a Windows Nano Server?

In same rare cases, you can migrate your code to .NET Core, but still run on Windows Nano server, with an image size of 95 MB. If you are using Docker-for-Windows, you can run now both windows and Linux containers simultaneously: Running Docker Windows and Linux Containers Simultaneously


2 Answers

Today, it is clearly possible.

I recently succeeded in containerizing Windows Guest using QEMU and Docker.

https://github.com/gnh1201/docker-qemu/wiki/Windows-Guest

like image 62
Go Namhyeon Avatar answered Oct 10 '22 08:10

Go Namhyeon


"windows docker": if that means docker for windows, running Windows container, then no.

You could run windows container on Linux the same way you are running Linux Container on windows: through a Virtual Machine emulating the target host.

Update Dec. 2016: Kubernetes 1.5 might offer a solution: see "Linux machine with docker deploy windows container"

like image 39
VonC Avatar answered Oct 10 '22 07:10

VonC