Web Analytics

windows-in-docker-container

⭐ 115 stars English by vaggeliskls

💻 Windows in Docker Container

Discover an innovative and efficient method of deploying Windows OS (x64) on your Linux system using the power of Vagrant VM, libvirt, and docker-compose. Together, these technologies help you containerize Windows OS, enabling you to manage a Windows instance just as you would any Docker container. This seamless integration into existing workflows significantly enhances convenience and optimizes resource allocation.

Don't forget to star the project if it helped you!

📋 Prerequisites

Ensure your system meets the following requirements:

🚀 Deployment Guide

# Vagrant image settings
MEMORY=8000     # MiB (~8 GB)
CPU=4
DISK_SIZE=100   # GiB
services:
  win10:
    image: docker.io/vaggeliskls/windows-in-docker-container:latest
    platform: linux/amd64
    env_file: .env
    stdin_open: true
    tty: true
    privileged: true
    cgroup: host
    restart: always
    ports:
      
  • 3389:3389
  • 2222:2222
  • Create docker-compose.override.yml when you want your VM to be persistent
  • services:
      win10:
        volumes:
          
    • libvirt_data:/var/lib/libvirt
    • vagrant_data:/root/.vagrant.d
    • vagrant_project:/app/.vagrant
    • libvirt_config:/etc/libvirt
    volumes: libvirt_data: name: libvirt_data vagrant_data: name: vagrant_data vagrant_project: name: vagrant_project libvirt_config: name: libvirt_config
    > First boot takes several minutes — the Vagrant box is already baked into the image, but the VM still has to boot and run the provisioning script (Chocolatey install, disk resize, registry tweaks). Follow progress with docker compose logs -f.

    When you want to destroy everything docker compose down -v

    windows screenshot

    🌐 Access

    Remote Desktop (RDP)

    For debugging or testing, you can connect to the VM using Remote Desktop on port 3389.

    #### Software for Remote Desktop Access | OS | Software | |----------|----------------| | Linux | rdesktoprdesktop :3389 or Remmina | | MacOS | Microsoft Remote Desktop | | Windows | Built-in Remote Desktop Connection |


    SSH

    You can connect via SSH using either the administrator or Vagrant user credentials.

    ssh @ -p 2222

    🔑 User Login

    Default users based on the Vagrant image are:

    ⚠️ Limitations

    🔧 Troubleshooting

    📚 Further Reading and Resources

    --- Tranlated By Open Ai Tx | Last indexed: 2026-07-15 ---