Cloud Native 5 min read

Run a Full Windows Desktop Inside Docker – Quick Setup Guide

This guide shows how to run a complete Windows 11 (or other versions) inside a Docker container on macOS or Linux, using the open‑source dockur/windows project, with step‑by‑step instructions for Docker Compose, Docker CLI, and Kubernetes deployment, plus configuration tips and screenshots.

IT Services Circle
IT Services Circle
IT Services Circle
Run a Full Windows Desktop Inside Docker – Quick Setup Guide

Developers who usually work on macOS often need to run Windows programs, but using a full virtual machine can be slow and cumbersome. The open‑source dockur/windows project lets you run an entire Windows system inside a Docker container, even allowing you to open the desktop in a browser.

What Docker Provides

Docker is a lightweight virtualization tool that packages an application and its runtime environment into a container. Containers include all necessary code, libraries, and configuration, start quickly, and use fewer resources than traditional VMs.

Supported Windows Versions

Supported Windows versions
Supported Windows versions

The default image installs Windows 11 Professional; you can change the VERSION environment variable to install other editions.

Installation and Usage Guide

1. Using Docker Compose

Create a docker-compose.yml file with the following content:

services:
  windows:
    image: dockurr/windows
    container_name: windows
    environment:
      VERSION: "11"
    devices:
      - /dev/kvm
      - /dev/net/tun
    cap_add:
      - NET_ADMIN
    ports:
      - 8006:8006
      - 3389:3389/tcp
      - 3389:3389/udp
    volumes:
      - ./windows:/storage
    restart: always
    stop_grace_period: 2m

2. Using Docker CLI

If you prefer not to write a Compose file, start the container directly:

docker run -it --rm --name windows \
  -p 8006:8006 \
  --device=/dev/kvm --device=/dev/net/tun \
  --cap-add NET_ADMIN \
  -v "${PWD:-.}/windows:/storage" \
  --stop-timeout 120 dockurr/windows

3. Deploying with Kubernetes

Apply the official Kubernetes manifest:

kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/master/kubernetes.yml

After configuring the VERSION variable if needed, run docker-compose up -d. In a few minutes open http://localhost:8006 in a browser to see the Windows desktop.

Building the Image

First extract a Windows 11 image (instructions omitted for brevity), then start the build process. The screenshots below illustrate the extraction, build, and installation steps.

Extract Windows image
Extract Windows image
Build process
Build process
Installation progress
Installation progress
Final Windows UI
Final Windows UI
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

DockerContainerWindowsVirtualizationDocker Compose
IT Services Circle
Written by

IT Services Circle

Delivering cutting-edge internet insights and practical learning resources. We're a passionate and principled IT media platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.