windows/src/entry.sh

33 lines
924 B
Bash
Raw Normal View History

2024-01-14 13:49:42 +00:00
#!/usr/bin/env bash
set -Eeuo pipefail
echo " Starting Windows for Docker v$(</run/version)..."
echo " For support visit https://github.com/dockur/windows"
2024-01-14 14:19:58 +00:00
export DISPLAY=web
export BOOT_MODE=windows
2024-01-15 03:27:57 +00:00
ln -sfn /usr/share/novnc/vnc_lite.html /usr/share/novnc/index.html
websockify -D --web /usr/share/novnc/ 8006 localhost:5900 2>/dev/null
2024-01-14 13:49:42 +00:00
cd /run
. reset.sh # Initialize system
. install.sh # Get bootdisk
. disk.sh # Initialize disks
. display.sh # Initialize graphics
. network.sh # Initialize network
. boot.sh # Configure boot
. proc.sh # Initialize processor
. config.sh # Configure arguments
trap - ERR
2024-01-14 19:32:24 +00:00
mkdir -p /tmp/emulated_tpm
swtpm socket -t -d --tpmstate dir=/tmp/emulated_tpm --ctrl type=unixio,path=/tmp/emulated_tpm/swtpm-sock --log level=1 --tpm2
2024-01-14 14:19:58 +00:00
info "Booting Windows using $VERS..."
2024-01-14 13:49:42 +00:00
[[ "$DEBUG" == [Yy1]* ]] && set -x
exec qemu-system-x86_64 ${ARGS:+ $ARGS}