Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker run container on different port

I am new to docker. Just tried to run a container on port 80

docker run -p 80:80 kitematic/hello-world-nginx 

and it seems to be working fine. I can get to the site at http://192.168.99.100/

but i tried changing the port to

docker run -p 70:50 kitematic/hello-world-nginx

and i cannot get to site at http://192.168.99.100:70. So how can i set a different port and connect to site please?

like image 684
rahul Avatar asked Mar 19 '17 18:03

rahul


1 Answers

Please try:

docker run -p 70:80 kitematic/hello-world-nginx

binding port is probably mistyped in the command you provided.

like image 157
hurturk Avatar answered Oct 29 '22 04:10

hurturk