dockur / windows

Windows inside a Docker container.
MIT License
29.34k stars 1.99k forks source link

[Bug]: Cannot download any Windows image "Reason: 4" #508

Closed 825i closed 6 months ago

825i commented 6 months ago

Is there no existing bug report for this?

Machine specifications

Ryzen 7 7800X3D

Operating system

Windows 11

Docker version

3.0.6

Description

Whenever I try to download any image, it just fails. The reason is always "4". Whatever that means. It would be nice for the user to know why it keeps failing. No other mirrors work either.

Docker compose

docker run -it --name windows -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN --stop-timeout 120 dockurr/windows

Docker log

❯ Starting Windows for Docker v3.06...
❯ For support visit https://github.com/dockur/windows
❯ CPU: AMD Ryzen 7 7800X3D 8 Core Processor | RAM: 15/16 GB | DISK: 955 GB (ext4) | HOST: 5.15.146.1-microsoft-standard-WSL2...

❯ Downloading Windows 11...
[i] Downloading Windows media from official Microsoft servers...
[i] Downloading Windows 11...
curl: (6) Could not resolve host: www.microsoft.com
[!] Failed to resolve Microsoft servers! Is there an Internet connection? Exiting...

[+] Finished! Please see the above errors with information
❯ Failed to download Windows 11 using Mido, will try a diferent method now...
❯ Downloading product information from Microsoft...
❯ ERROR: Failed to download https://go.microsoft.com/fwlink?linkid=2156292 , reason: 4
❯ Failed to download Windows 11, will try another mirror now...
❯ Downloading Windows 11 from bobpony.com...
❯ ERROR: Failed to download https://dl.bobpony.com/windows/11/en-us_windows_11_23h2_x64.iso , reason: 4
❯ Failed to download Windows 11, will try another mirror now...
❯ Downloading Windows 11 from massgrave.dev...
❯ ERROR: Failed to download https://drive.massgrave.dev/en-us_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso , reason: 4

Screenshots (optional)

image

825i commented 6 months ago

Solved by first running:

podman network create and then assigning the container that network.

It seems podman wasn't properly making and assigning a bridge network to the image.

EDIT: Also it seems this container is incompatible running on Windows... I wanted to test it in Windows.

kroese commented 6 months ago

@825i This container runs fine on Windows if you use Docker Desktop for Windows 11. I never tried it with Podman, but the container is called "Windows for Docker" not "Windows for Podman" so I am not surprised that it does not work.