Windows

Windows – Seamless Integration And Management

Explore the innovative approach to running Windows inside a Docker container, offering a streamlined and flexible solution for developers and IT professionals.

This guide provides an in-depth look at setting up Windows environments using Docker, from automatic ISO downloads and KVM acceleration to web-based management.

Whether you’re looking to create a Windows 11 machine or need to run legacy versions, this article covers everything you need to get started with ease.

Windows in a Docker container.

Features

  • ISO downloader
  • KVM acceleration
  • Web-based viewer

Usage

Via docker-compose.yml

version: "3"
services:
  windows:
    image: dockurr/windows
    container_name: windows
    devices:
      - /dev/kvm
    cap_add:
      - NET_ADMIN
    ports:
      - 8006:8006
      - 3389:3389/tcp
      - 3389:3389/udp
    stop_grace_period: 2m
    restart: on-failure

Via docker run

docker run -it --rm --name windows -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN --stop-timeout 120 dockurr/windows

FAQ

  • How do I use it?Very simple! These are the steps:
    • Start the container and connect to port 8006 using your web browser.Sit back and relax while the magic happens, the whole installation will be performed fully automatic.
      • Once you see the desktop, your Windows installation is ready for use.
      Enjoy your brand new machine, and don’t forget to star this repo!
  • How do I select the Windows version?By default, Windows 11 will be installed.
    • But you can add the VERSION environment variable to your compose file, in order to specify an alternative Windows version to be downloaded:
environment:
  VERSION: "win11"
  • Select from the values below:ValueDescriptionSourceTransferSizewin11Windows 11 ProMicrosoftFast6.4 GBwin10Windows 10 ProMicrosoftFast5.8 GBltsc10Windows 10 LTSCMicrosoftFast4.6 GBwin81Windows 8.1 ProMicrosoftFast4.2 GBwin7Windows 7 SP1Bob PonyMedium3.0 GBvistaWindows Vista SP2Bob PonyMedium3.6 GBwinxpWindows XP SP3Bob PonyMedium0.6 GB2022Windows Server 2022MicrosoftFast4.7 GB2019Windows Server 2019MicrosoftFast5.3 GB2016Windows Server 2016MicrosoftFast6.5 GB2012Windows Server 2012 R2MicrosoftFast4.3 GB2008Windows Server 2008 R2MicrosoftFast3.0 GBcore11Tiny 11 CoreArchive.orgSlow2.1 GBtiny11Tiny 11Archive.orgSlow3.8 GBtiny10Tiny 10Archive.orgSlow3.6 GBTo install ARM64 versions of Windows use dockur/windows-arm.
  • How do I connect using RDP?The web-viewer is mainly ment to be used during installation, as its picture quality is low, and it has no audio or clipboard for example.
    • So for a better experience you can connect using any Microsoft Remote Desktop client to the IP of the container, using the username docker and by leaving the password empty.
      • There is a good RDP client for Android available from the Play Store. One for iOS is in the Apple Store.
        • For Linux you can use rdesktop and for Windows you don’t need to install anything as it is already ships as part of the operating system.

How Do I Increase The Amount Of CPU Or RAM

By default, 2 CPU cores and 4 GB of RAM are allocated to the container, as those are the minimum requirements of Windows 11.

To increase this, add the following environment variables:

environment:
  RAM_SIZE: "8G"
  CPU_CORES: "4"
Varshini

Varshini is a Cyber Security expert in Threat Analysis, Vulnerability Assessment, and Research. Passionate about staying ahead of emerging Threats and Technologies.

Recent Posts

Understanding the Model Context Protocol (MCP) and How It Works

Introduction to the Model Context Protocol (MCP) The Model Context Protocol (MCP) is an open…

17 hours ago

The file Command – Quickly Identify File Contents in Linux

While file extensions in Linux are optional and often misleading, the file command helps decode what a…

1 day ago

How to Use the touch Command in Linux

The touch command is one of the quickest ways to create new empty files or update timestamps…

1 day ago

How to Search Files and Folders in Linux Using the find Command

Handling large numbers of files is routine for Linux users, and that’s where the find command shines.…

1 day ago

How to Move and Rename Files in Linux with the mv Command

Managing files and directories is foundational for Linux workflows, and the mv (“move”) command makes it easy…

1 day ago

How to Create Directories in Linux with the mkdir Command

Creating directories is one of the earliest skills you'll use on a Linux system. The mkdir (make…

1 day ago