127.0.0.1 vs 0.0.0.0
An app inside a container listens on 127.0.0.1:8080. The container is started with -p 8080:8080, but requests from the host fail. Why?
127.0.0.1:8080
-p 8080:8080
Choose one answer
Port 8080 is reserved by Docker.
The app only accepts connections on the container's loopback interface; it must listen on 0.0.0.0 (all interfaces) to receive forwarded traffic.
0.0.0.0
-p only works for UDP.
-p
Containers cannot use port 8080.