dockur / windows-arm

Windows for ARM in a Docker container.
MIT License
630 stars 61 forks source link

Docker maclvn network #139

Open E1t2han opened 1 month ago

E1t2han commented 1 month ago

Operating system

ubuntu 24.04 arm

Description

I use the command docker network create -d macvlan --subnet=192.168.0.0/24 --gateway=192.168.0.1 -o parent=end1 vlan created docker maclvn network, when I use the command docker compose up ,the container (windows 11 arm) started successful,but I Couldn't access the container from the web http://localhost:8006/, If I delete the networks in docker-compose.yml, I Can access the container from the web http://localhost:8006/ successful, I want to use the RDP to connect the container,can you help me?

Docker compose

services: windows: container_name: windows image: dockurr/windows-arm environment: VERSION: "win11" RAM_SIZE: "8G" CPU_CORES: "4" DISK_SIZE: "256G"
devices:

networks: vlan: external: true

Docker log

Image_1716997821557 Image_1716997818960

Screenshots (optional)

Image_1716996505432 Image_1716996512186 Image_1716996521068

kroese commented 1 month ago

If you use macvlan you cannot connect to localhost, but you must do it to 192.168.0.150 instead.

So try http://192.168.0.150:8006

E1t2han commented 1 month ago

I access the container from the web http://192.168.0.150:8006,but I still couldn't acess the container,my box is Nanopc T6(cpu: RK 3588),thanks!Image_1717066462804.png

Image_1717066945791.png

kroese commented 1 month ago

With macvlan you cannot reach that IP from the host (this is described in the FAQ, and also a solution is given). Normally this is not a problem, because people run the container on their server, and access the IP from their desktop/laptop. But from the screenshots it looks like you are running the browser on the same machine where the docker is running.

So go to http://192.168.0.150:8006/ from another machine in your network (your mobile phone for example) and confirm it works. After that you can apply the workaround as described in the FAQ to also make it work from the same machine, but its a little bit complicated.

I dont even understand why you enabled macvlan in the first place, because if you only need access from the same machine, then macvlan has no real advantage over the default bridge networking with localhost.