Docker Map Port

December 15, 2019
Access Container from Host

Bind to 0.0.0.0: all IPv4 address on local machine

docker run -it -p 5000:5000 ubuntu

Bind to specific IP

docker run -it -p 127.0.0.1:5000:5000 ubuntu

Bind to multiple IPs

docker run -it -p 5000:5000 -p 9005:9005 ubuntu
This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.