Compare commits

..

No commits in common. "70a92d350313a9c67498c6e049c3022783fe9c0b" and "81e9fff270a9304750ce42d4b90755304d57dd16" have entirely different histories.

2 changed files with 19 additions and 25 deletions

View File

@ -203,6 +203,15 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
KEYBOARD: "en-US"
```
### How do I set the product key?
By default, an evaluation version of Windows will be installed, but if you have a product key you can add a `KEY` variable like this (before installation):
```yaml
environment:
KEY: "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx"
```
### How do I select the edition?
Windows Server offers a minimalistic Core edition without a GUI. To select those non-standard editions, you can add a `EDITION` variable like this (before installation):
@ -247,7 +256,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
It's recommended to stick to the automatic installation, as it adjusts various settings to prevent common issues when running Windows inside a virtual environment.
However, if you insist on performing the installation manually at your own risk, add the following environment variable to your compose file:
However, if you insist on performing the installation manually on your own risk, add the following environment variable to your compose file:
```yaml
environment:

View File

@ -10,7 +10,6 @@ EFISYS="efi/microsoft/boot/efisys_noprompt.bin"
skipInstall() {
local iso="$1"
local method=""
local magic byte
local boot="$STORAGE/windows.boot"
local previous="$STORAGE/windows.base"
@ -19,22 +18,14 @@ skipInstall() {
previous=$(<"$previous")
previous="${previous//[![:print:]]/}"
if [ -n "$previous" ]; then
if [[ "${STORAGE,,}/${previous,,}" != "${iso,,}" ]]; then
previous="$STORAGE/$previous"
if [[ "${previous,,}" != "${iso,,}" ]]; then
if [ -f "$boot" ] && hasDisk; then
if [[ "${iso,,}" == "${STORAGE,,}/windows."* ]]; then
method="your custom .iso file"
else
if [[ "${previous,,}" != "windows."* ]]; then
method="the VERSION variable"
fi
fi
if [ -n "$method" ]; then
info "Detected that $method was changed, but ignoring this because Windows is already installed."
info "Please start with an empty /storage folder, if you want to install a different version of Windows."
fi
info "Detected that the version was changed, but ignoring this because Windows is already installed."
info "Please start with an empty /storage folder, if you want to install a different version of Windows."
return 0
fi
rm -f "$STORAGE/$previous"
[ -f "$previous" ] && rm -f "$previous"
return 1
fi
fi
@ -209,19 +200,13 @@ abortInstall() {
detectCustom() {
local dir file base
local file base
local fname="custom.iso"
local boot="$STORAGE/windows.boot"
CUSTOM=""
dir=$(find / -maxdepth 1 -type d -iname "$fname" | head -n 1)
[ ! -d "$dir" ] && dir=$(find "$STORAGE" -maxdepth 1 -type d -iname "$fname" | head -n 1)
if [ -d "$dir" ]; then
if ! hasDisk || [ ! -f "$boot" ]; then
error "The bind $dir maps to a file that does not exist!" && return 1
fi
if [ -d "/$fname" ]; then
error "The file /$fname does not exist, please make sure that you mapped it to a valid path!" && return 1
fi
file=$(find / -maxdepth 1 -type f -iname "$fname" | head -n 1)
@ -510,7 +495,7 @@ setXML() {
local file="/custom.xml"
if [ -d "$file" ]; then
error "The bind $file maps to a file that does not exist!" && exit 67
warn "The file $file does not exist, please make sure that you mapped it to a valid path!"
fi
[ ! -f "$file" ] || [ ! -s "$file" ] && file="$STORAGE/custom.xml"