Compare commits

..

2 Commits
v2.09 ... v2.10

Author SHA1 Message Date
Kroese
56cb787c55 fix: Delete ISO when extraction fails (#372) 2024-04-13 16:58:04 +02:00
Kroese
da9ef0e061 docs: Readme (#356) 2024-04-07 01:59:20 +02:00
4 changed files with 11 additions and 4 deletions

View File

@@ -6,6 +6,8 @@
.gitmodules
Dockerfile
Dockerfile.archive
compose.yml
compose.yaml
docker-compose.yml
docker-compose.yaml
*.md

View File

@@ -25,7 +25,7 @@ Windows in a Docker container.
## Usage
Via `docker-compose.yml`
Via Docker Compose:
```yaml
version: "3"
@@ -47,7 +47,7 @@ services:
restart: on-failure
```
Via `docker run`
Via Docker CLI:
```bash
docker run -it --rm --name windows -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN --stop-timeout 120 dockurr/windows

View File

@@ -316,6 +316,7 @@ startInstall() {
fi
rm -rf "$TMP"
mkdir -p "$TMP"
if [ ! -f "$STORAGE/$CUSTOM" ]; then
@@ -325,7 +326,6 @@ startInstall() {
ISO="$STORAGE/$CUSTOM"
fi
rm -f "$TMP/$BASE"
return 0
}
@@ -445,6 +445,9 @@ downloadImage() {
info "Failed to download $desc using Mido, will try a different method now..."
rm -rf "$TMP"
mkdir -p "$TMP"
ISO="$TMP/$VERSION.esd"
iso="$ISO"
file="$ISO"
@@ -573,6 +576,7 @@ extractImage() {
if [[ "${iso,,}" == *".esd" ]]; then
if ! extractESD "$iso" "$dir"; then
rm -f "$iso"
error "Failed to extract ESD file!"
exit 67
fi
@@ -604,6 +608,7 @@ extractImage() {
rm -rf "$dir"
if ! 7z x "$iso" -o"$dir" > /dev/null; then
rm -f "$iso"
error "Failed to extract ISO file!"
exit 66
fi