Why your container is unreachable
Containers have their own network namespace. Their ports are not on the host's network until you explicitly map them. EXPOSE in a Dockerfile is documentation only — it does not publish anything.
The -p syntax
-p [HOST_IP:]HOST_PORT:CONTAINER_PORT[/PROTOCOL]-p 8080:80— host 8080 → container 80 (TCP, all interfaces)-p 127.0.0.1:8080:80— bind to loopback only (not exposed to LAN)-p 8080:80/udp— UDP instead of TCP-p 80— random host port. Find it withdocker port.
The order is HOST:CONTAINER
This trips everyone. -p 8080:80 means "hit my laptop on 8080 and you reach the container's 80." Reverse it and your hopes are also reversed.