Run a Full Windows Desktop Inside Docker – Quick Guide
This article introduces the open‑source dockur/windows project that lets you run a complete Windows 11 (or other editions) inside a Docker container, eliminating the need for a virtual machine or remote desktop, and provides step‑by‑step instructions using Docker Compose, CLI, and Kubernetes.
Developers often use macOS but sometimes need to run Windows programs. Instead of a slow virtual machine or remote desktop, the open‑source dockur/windows project allows you to run an entire Windows system directly inside a Docker container, even accessible via a browser.
Docker is a lightweight virtualization tool that packages applications with their runtime environment. Containers include all necessary code, dependencies, and configuration, start quickly, and consume fewer resources than traditional VMs.
The dockur/windows image puts Windows inside Docker, enabling you to launch Windows 11 Professional (or other versions) by setting the VERSION environment variable.
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, run 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, start the services with docker-compose up -d. In a few minutes, open http://localhost:8006 in a browser to see the Windows desktop.
The process includes extracting the Windows 11 image, building the container, and completing the installation, after which the full Windows UI is available inside the Docker environment.
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.
Java Tech Enthusiast
Sharing computer programming language knowledge, focusing on Java fundamentals, data structures, related tools, Spring Cloud, IntelliJ IDEA... Book giveaways, red‑packet rewards and other perks await!
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.
