Run headless container. Connect via VNC.
You must have enabled KVM on the host.
systemctl enable libvirtd.service
systemctl enable virtlogd.service
modprobe kvm_intel
Get official Windows 10 ISO image from official source. This tutorial might come in handy.
Create HDD image, where system will be installed. Choose custom disk size.
docker build -t win10-hdd -f hdd.Dockerfile .
docker run --rm -v $PWD:/data win10-hdd 128G
In order to use KVM inside container, it needs to run as privileged. Do not forget to mount files we created earlier:
/home/arch/win10_x64.iso
./home/arch/win10_hdd.img
.docker build -t win10 .
docker run -d --name win10-in-docker \
-p 5901:5901 \
--privileged --cap-add=ALL \
-v /lib/modules:/lib/modules \
-v /dev:/dev \
-v $PWD/Win10_2004_English_x64.iso:/home/arch/win10_x64.iso \
-v $PWD/win10_hdd.img:/home/arch/win10_hdd.img \
win10
Inspired by:
You need to have valid licence and download Windows 10 ISO image from official sources. This contaier just helps with virtualization.