Skip to content

Instantly share code, notes, and snippets.

@kylemanna
Last active March 17, 2024 22:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylemanna/f9fc94ab873526ec8824b8ce31c7ffc1 to your computer and use it in GitHub Desktop.
Save kylemanna/f9fc94ab873526ec8824b8ce31c7ffc1 to your computer and use it in GitHub Desktop.
Podman Compose File that runs Windows in KVM + QEMU
# Podman Compose File that runs Windows in KVM + QEMU
#
# Upstream: https://github.com/dockur/windows
#
# Note: Can't run this rootless as the netardvark proxy doesn't create a host
# network interface for communication with the container which is what's
# expected for the iptables NAT port forwarding rule to work for port 3389.
# Instead it arrives appearing to be from the same interface and skips the nat
# redirect and fails.
#
# Usage:
# 1. Bring the service up: `sudo podman compose up`
# 2. Load web browser: http://127.0.0.2:8006 and monitor install / use VN
# 3. Use freerdp: `wlfreerdp /v:127.0.0.2 /cert:tofu /u:docker /p: /dynamic-resolution`
version: "3"
services:
windows:
image: docker.io/dockurr/windows
container_name: windows
devices:
- /dev/kvm
- /dev/net/tun
cap_add:
- NET_ADMIN
- NET_RAW
ports:
- 127.0.0.2:8006:8006
- 127.0.0.2:3389:3389/tcp
- 127.0.0.2:3389:3389/udp
stop_grace_period: 2m
restart: on-failure
volumes:
- ./storage:/storage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment