No Port Forwarding With Container Networking
If you need to use one container’s network across containers (e.g., --network container:vpn
), you cannot also forward ports. I wasted an hour trying to figure out why I couldn’t forward port 3000 to 80 (-p 80:3000
) when using container networking. After being thoroughly frustrated, I changed the default port of the underlying service to use 80, switched the port docker switch to -p 80:80
, and now it works fine…