Skip to main content

Windows OS inside a Linux Container (more or less)

·372 words·2 mins
Feature image: green container with window

What is “Windows inside a Docker container”? #

“Windows inside a Docker container” is an open-source project that leverages Docker to create a seamless bridge between Windows operating systems and containerization.

It provides an ISO downloader, allowing you to select and download various Windows versions directly from within the container (Windows 10/11, Windows Server 2019/2022, even old versions like Windows XP/Vista). It utilizes KVM (Kernel-based Virtual Machine) acceleration, enhancing performance and compatibility. During installation, Dockurr offers a web-based viewer for easy interaction. However, for a better experience, you can connect using Microsoft Remote Desktop clients.

Supported Windows OS #

Most Windows versions are supported.

ValueDescriptionPlatform x64ARM64
win11Windows 11 Proyesyes
win10Windows 10 Proyesyes
ltsc10Windows 10 LTSCyes
win81Windows 8.1 Proyes
win7Windows 7 SP1yes
vistaWindows Vista SP2yes
winxpWindows XP SP3yes
2022Windows Server 2022yes
2019Windows Server 2019yes
2016Windows Server 2016yes
2012Windows Server 2012 R2yes
2008Windows Server 2008 R2yes
core11Tiny 11 Coreyes
tiny11Tiny 11yes
tiny10Tiny 10yes

How to use it? #

You already have docker and qemu/libvirt installed.

Create a directory (e.g. “/data/applications/windows”) where you want to store the downloaded ISO image (otherwise the ISO will be downloaded on each deployment).

Deployment #

You can use docker-compose or portainer to get started. Here is an docker-compose example file for installing Windows Server 2022.

version: "3"
services:
  windows:
    image: dockurr/windows
    container_name: windows-win2022
    environment:
      VERSION: 2022
    devices:
      - /dev/kvm
    cap_add:
      - NET_ADMIN
    ports:
      - 8006:8006
      - 3389:3389/tcp
      - 3389:3389/udp
    stop_grace_period: 2m
    volumes:
      - /data/applications/windows/2022:/storage
    restart: on-failure
The installation takes place in trial mode, Windows is not activated.

Connect using your Web-Browser #

Just use your browser to connect to your freshly started Windows Instance: http://<hostname>:8006/

Dockur Browser View
Browser View

Connect using RDP #

Just use your preferred RDP client to connect to your Windows Instance, login user is “docker”, leave the password empty.

Dockur RDP
RDP

Install process #

Download, build, setup, boot - enjoy :-)

Why do I need this? #

It makes fun😀 And it’s perfect for tests and short-lived instances without the overhead of fully managed virtual machines More information

Find all the details for x64 here: https://github.com/dockur/windows and for ARM64 here: https://github.com/dockur/windows-arm/