Compare commits

..

No commits in common. "b7ad0d3d88212ef525c145bd0fe669e0b12a1b0b" and "a3a2b3fb095a080b9760e137edae47ff94a2ced3" have entirely different histories.

5 changed files with 10 additions and 9 deletions

View File

@ -1,6 +1,6 @@
{
"name": "windows",
"service": "windows",
"forwardPorts": [8006],
"forwardPorts": ["8006"],
"dockerComposeFile": "compose.yml"
}

View File

@ -1,7 +1,7 @@
ARG VERSION_ARG="latest"
FROM scratch AS build-amd64
COPY --from=qemux/qemu:7.02 / /
COPY --from=qemux/qemu:7.01 / /
ARG DEBCONF_NOWARNINGS="yes"
ARG DEBIAN_FRONTEND="noninteractive"

View File

@ -1300,9 +1300,6 @@ prepareInstall() {
[ -n "$PASSWORD" ] && password="$PASSWORD"
[ -n "$USERNAME" ] && username=$(echo "$USERNAME" | sed 's/[^[:alnum:]@!._-]//g')
local ip="20.20.20.1"
[ -n "${VM_NET_IP:-}" ] && ip="${VM_NET_IP%.*}.1"
# These are not pirated keys, they come from the official MS documentation.
if [[ "${driver,,}" == "xp" ]]; then
if [[ "${arch,,}" == "x86" ]]; then
@ -1497,7 +1494,7 @@ prepareInstall() {
echo "Set oFSO = CreateObject(\"Scripting.FileSystemObject\")"
echo "Set oHosts = oFSO.GetFile(\"C:\Windows\System32\drivers\etc\hosts\")"
echo "Set fileAPPEND = oFSO.OpenTextFile(\"C:\Windows\System32\drivers\etc\hosts\", 8, true)"
echo "fileAPPEND.Write(\"$ip host.lan\")"
echo "fileAPPEND.Write(\"${VM_NET_IP%.*}.1 host.lan\")"
echo "fileAPPEND.Close()"
echo ""
} | unix2dos > "$dir/\$OEM\$/admin.vbs"

View File

@ -628,9 +628,7 @@ updateXML() {
local language="$2"
local culture region user admin pass keyboard
if [ -n "${VM_NET_IP:-}" ]; then
sed -i "s/ 20.20.20.1 / ${VM_NET_IP%.*}.1 /g" "$asset"
fi
sed -i "s/ 20.20.20.1 / ${VM_NET_IP%.*}.1 /g" "$asset"
[ -z "$HEIGHT" ] && HEIGHT="720"
[ -z "$WIDTH" ] && WIDTH="1280"

View File

@ -111,8 +111,14 @@ done
if ! smbd; then
error "Samba daemon failed to start!"
smbd -i --debug-stdout || true
else
if [[ "${NETWORK,,}" == "user"* ]]; then
NET_OPTS="${NET_OPTS/,hostfwd/,guestfwd=tcp:${VM_NET_IP%.*}.1:445-tcp:127.0.0.1:445,hostfwd}"
fi
fi
[[ "${NETWORK,,}" == "user"* ]] && return 0
if [[ "${BOOT_MODE:-}" == "windows_legacy" ]]; then
# Enable NetBIOS on Windows 7 and lower
if ! nmbd; then