Cloud Native 4 min read

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.

Java Tech Enthusiast
Java Tech Enthusiast
Java Tech Enthusiast
Run a Full Windows Desktop Inside Docker – Quick Guide

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: 2m

2. 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/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, 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.

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.

KubernetesContainerWindowsVirtualizationDocker Compose
Java Tech Enthusiast
Written by

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!

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.