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.
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
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: 2m2. 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/windows3. Deploying with Kubernetes
Apply the official Kubernetes manifest:
kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/master/kubernetes.ymlAfter 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.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
IT Services Circle
Delivering cutting-edge internet insights and practical learning resources. We're a passionate and principled IT media platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
