Run normal Win32 applications in Docker for Windows

if you have Windows Server 2016, you will be able to launch Windows containers (and you will need a Linux server to launch Linux containers).

See those links

https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/manage_docker

https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/container_setup

https://msdn.microsoft.com/en-us/virtualization/windowscontainers/containers_welcome

In Windows, your Dockerfile will start with

FROM windowsservercore

instead of the more usual

FROM debian or FROM ubuntu

See some examples of IIS in (Windows) docker

https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/manage_docker

or a SQL Server in docker

http://26thcentury.com/2016/01/03/dockerfile-to-create-sql-server-express-windows-container-image/


The types of application that are candidates for docker are applications that do not have a UI.

Unlike a VM docker images are very slim having only enough codebase to service a particular use case. You can however create a docker image and use VNC to view a desktop like environment; but you have to go through hoops to configure it. Far easier to have a VM if you need a gui surface.

The strength of docker is to easily create containers of servers and DB back ends. You can even run email servers, or a stack of restful services.

On my laptop I had installed mysql, IIS and PHP. With docker I migrated all of these into an image. I spin it up when I need it and in less than 10 seconds i have a working db backend, an IIS server with PHP interface. I can maintain different versions of mysql, IIS and PHP for different iterations, they are all isolated from each other and run in their own container. When I upgrade my laptop I will not need to install any of these, just the image will work.


I know the topic is a bit old, but since I just tried I thought I'll add my 2ct.

No, you cannot start a Windows application inside a container and expect its windows to appear on your desktop.

While starting such an application is possible, in fact, it's of little use because you won't be able to see or interact with the UI.

For example, you can start notepad.exe in your Windows Core Server container and verify that the process is running (using tasklist instead of taskmanager, which cannot be seen as well). But you cannot type anything into this notepad instance or access the menu.

Hth, mav