When you use -P , the docker binds the open port to a random high port from the range 49153 to 65535 on the docker host. To determine the actual port, you need to run
docker port <CONTAINER> 80
When you use -p 80:80 , you specifically bind the open port to host port 80.
dcro source share