Docker run container on different port

10,027

Please try:

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

binding port is probably mistyped in the command you provided.

Share:
10,027
rahul
Author by

rahul

Updated on June 24, 2022

Comments

  • rahul
    rahul almost 2 years

    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?

  • rahul
    rahul about 7 years
    yes, it is a mistyping. Apologies, working fine now.