Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker Container for Windows - desktop app

If I create a container with windows image on it, is it possible to use a remote connection to actually see the desktop and , for example, play minesweeper?

My use case is this:

I have hundreds of users. Each user need to create their our infrastructure consisting in about 6 machines linked together. After creating, the user will open some desktop gui apps on each one using a remote desktop connection.

like image 696
guilhermecgs Avatar asked Oct 18 '16 11:10

guilhermecgs


People also ask

Can you run Windows app in 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.

Can Docker be used for Desktop application?

Docker Desktop is an easy-to-install application for your Mac, Linux, or Windows environment that enables you to build and share containerized applications and microservices.

Can you Containerize a Windows application?

You can run any application in Docker as long as it can be installed and executed unattended, and the base operating system supports the app. Windows Server Core runs in Docker which means you can run pretty much any server or console application in Docker.

What is the difference between Docker Desktop and Docker for Windows?

Docker containers are running inside the virtual machine. Everything else is a consequence. Docker Desktop just tries to hide that fact from you so you don't need to setup a virtual machine and the client-server connection. Having a virtual machine is required on Windows and MacOS if you want to run Linux containers.


1 Answers

No, this isn't something you will be able to do.

There are currently two Windows container images, microsoft/windowsservercore and microsoft/nanoserver

nanoserver

This blog post about TP4 (one of the earlier releases) says

The only option available when logging into console of a virtual machine running Nano Server or connecting a crash cart to a physical Nano Server is this very plain emergency console

This section on managing Nano server also states

Nano Server is managed remotely. There is no local logon capability at all, nor does it support Terminal Services.

There is also this article, admittedly not from Microsoft, about Windows Nano server

Nano Server strips back the operating system further still, dropping things like the GUI stack, 32-bit Win32 support, local logins, and remote desktop support.

Nano Server is designed for two kinds of workload: cloud apps built on runtimes such as .NET, Java, Node.js, or Python, and cloud infrastructure, such as hosting Hyper-V virtual machines.

servercore

Docker blog has a pretty interesting entry Introducing Docker for Windows Server 2016. This part addresses the question of GUI apps

The Windows Server Core image comes with a mostly complete userland with the processes and DLLs found on a standard Windows Server Core install. With the exception of GUI apps and apps requiring Windows Remote Desktop, most apps that run on Windows Server can be dockerized to run in an image based on microsoft/windowsservercore with minimal effort.


If you wanted to set up that kind of an environment, one option is to use something like Vagrant to orchestrate starting and provisioning regular windows VMs. Though 6 windows VMs will not be easy on memory.

like image 99
Roman Avatar answered Sep 18 '22 00:09

Roman