Created
September 25, 2021 00:25
-
-
Save ca0abinary/9b18cd02993c9a4d38233295d945cfc4 to your computer and use it in GitHub Desktop.
Windows 2003 in a docker container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine | |
WORKDIR /root | |
ADD system.tar.gz /root | |
RUN apk add --update qemu-system-x86_64 qemu-img spice-server qemu-hw-display-qxl | |
EXPOSE 80 | |
EXPOSE 3001 | |
ENTRYPOINT ["qemu-system-x86_64", \ | |
"-m", "512", \ | |
"-drive", "file=/root/system.qcow2", \ | |
"--spice", "disable-ticketing=on,addr=0.0.0.0,port=3001", \ | |
"-vga", "qxl" \ | |
] | |
# Build original system.tar.gz | |
# | |
# 1. Download Micro2003-Without-Driverpacks.iso from the internet archive | |
# 2. Run the following commands: | |
# ```sh | |
# docker run --rm -it -v "$(pwd):/base" -p 3001:3001 alpine | |
# apk add --update qemu-system-x86_64 qemu-img spice-server qemu-hw-display-qxl | |
# qemu-img create -f qcow2 /base/system.qcow2 512m | |
# qemu-system-x86_64 -m 512 -drive file=/base/system.qcow2 -cdrom /base/Micro2003-Without-Driverpacks.iso --spice disable-ticketing=on,addr=0.0.0.0,port=3001 -vga qxl | |
# ``` | |
# 3. Install virt viewer on your main operating system and connect to spice://localhost:3001 | |
# 4. Install windows uising virt viewer | |
# 5. Shut down windows normally | |
# 6. In the docker container shell execute `cd /base; tar -cvzf system.tar.gz system.qcow2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment