2024-07-18 18:27:07 +10:00
# For documentation, FAQ, additional configuration options and technical help, visit: https://github.com/dockur/windows
2024-05-26 12:31:31 +02:00
2024-07-18 18:27:07 +10:00
name : "winapps" # Docker Compose Project Name.
2024-05-26 12:31:31 +02:00
volumes :
2024-07-19 13:32:43 +10:00
# Create Volume 'data'.
# Located @ '/var/lib/docker/volumes/winapps_data/_data' (Docker).
# Located @ '/var/lib/containers/storage/volumes/winapps_data/_data' or '~/.local/share/containers/storage/volumes/winapps_data/_data' (Podman).
data :
2024-05-26 12:31:31 +02:00
services :
windows :
2024-11-29 11:29:52 +01:00
image : ghcr.io/dockur/windows:latest
2024-07-18 18:27:07 +10:00
container_name : WinApps # Created Docker VM Name.
2024-05-26 12:31:31 +02:00
environment :
2024-07-18 18:27:07 +10:00
# Version of Windows to configure. For valid options, visit:
# https://github.com/dockur/windows?tab=readme-ov-file#how-do-i-select-the-windows-version
# https://github.com/dockur/windows?tab=readme-ov-file#how-do-i-install-a-custom-image
2025-04-05 12:36:13 +02:00
VERSION : "11"
RAM_SIZE : "4G" # RAM allocated to the Windows VM.
2024-07-18 18:27:07 +10:00
CPU_CORES : "4" # CPU cores allocated to the Windows VM.
2025-04-05 12:36:13 +02:00
DISK_SIZE : "64G" # Size of the primary hard disk.
2025-06-04 13:47:21 +02:00
# DISK2_SIZE: "32G" # Uncomment to add an additional hard disk to the Windows VM. Ensure it is mounted as a volume below.
2025-04-05 12:36:13 +02:00
USERNAME : "MyWindowsUser" # Edit here to set a custom Windows username. The default is 'MyWindowsUser'.
PASSWORD : "MyWindowsPassword" # Edit here to set a password for the Windows user. The default is 'MyWindowsPassword'.
2024-07-18 18:27:07 +10:00
HOME : "${HOME}" # Set path to Linux user home folder.
2024-05-26 12:31:31 +02:00
ports :
2026-03-16 14:03:34 +01:00
# Map '8006' on Linux host to '8006' on Windows VM --> For VNC Web Interface @ http://127.0.0.1:8006.
- "127.0.0.1:8006:8006"
# Map '3389' on Linux host to '3389' on Windows VM --> For Remote Desktop Protocol (RDP).
- "127.0.0.1:3389:3389/tcp"
- "127.0.0.1:3389:3389/udp"
# Uncomment the next two lines and comment out the two above to expose RDP to the local network.
# - 3389:3389/tcp
# - 3389:3389/udp
2025-04-02 12:52:55 +02:00
cap_add :
- NET_ADMIN # Add network permission
2026-08-09 17:48:48 +02:00
- NET_RAW # Required by dnsmasq for dockur's NAT networking; without it the container falls back to user-mode (passt) networking, which breaks RDP port forwarding from the host
2024-07-18 18:27:07 +10:00
stop_grace_period : 120s # Wait 120 seconds before sending SIGTERM when attempting to shut down the Windows VM.
restart : on -failure # Restart the Windows VM if the exit code indicates an error.
2024-05-26 12:31:31 +02:00
volumes :
2024-07-18 18:27:07 +10:00
- data:/storage # Mount volume 'data' to use as Windows 'C:' drive.
- ${HOME}:/shared # Mount Linux user home directory @ '\\host.lan\Data'.
2025-06-04 13:47:21 +02:00
#- /path/to/second/hard/disk:/storage2 # Uncomment to create a virtual second hard disk and mount it within the Windows VM. Ensure 'DISK2_SIZE' is specified above.
2024-07-18 18:27:07 +10:00
- ./oem:/oem # Enables automatic post-install execution of 'oem/install.bat', applying Windows registry modifications contained within 'oem/RDPApps.reg'.
#- /path/to/windows/install/media.iso:/custom.iso # Uncomment to use a custom Windows ISO. If specified, 'VERSION' (e.g. 'tiny11') will be ignored.
devices :
- /dev/kvm # Enable KVM.
2025-04-02 12:52:55 +02:00
- /dev/net/tun # Enable tuntap
2025-06-04 13:47:21 +02:00
# Uncomment to mount a disk directly within the Windows VM.
# WARNING: /dev/sdX paths may change after reboot. Use persistent identifiers!
# NOTE: 'disk1' will be mounted as the main drive. THIS DISK WILL BE FORMATTED BY DOCKER.
# All following disks (disk2, ...) WILL NOT BE FORMATTED.
# - /dev/disk/by-id/<id>:/disk1
2025-08-01 16:50:37 +10:00
# - /dev/disk/by-id/<id>:/disk2
2025-06-04 13:47:21 +02:00
# group_add: # uncomment this line and the next one for using rootless podman containers
# - keep-groups # to make /dev/kvm work with podman. needs "crun" installed, "runc" will not work! Add your user to the 'kvm' group or another that can access /dev/kvm.