user3237421
user3237421

Reputation: 1

Unable to browse nodejs web app running docker container

I am new to Docker.io. I crated image using standard image ubuntu from index.docoker.io successfully in aws instance.I installed node.js and simple web app in the image and created docker container and test successfully with the following: curl -i localhost:49160 in the browser I specified hostip:1704 but I am not getting the page

Upvotes: 0

Views: 335

Answers (1)

Filip Jukić
Filip Jukić

Reputation: 1184

It looks like you're using the wrong port to access the application. Try pointing your browser to http://<host_ip>:49160

The application inside the container is exposing the port 1704, and when you run the container with the parameter -p 49160:1704, you're forwarding the port 49160 on your host machine to the port 1704 inside the container. When using the browser to access the app, you use the IP of the host machine and the open port, in this case 49160.

See the Redirect ports documentation for more info.

Upvotes: 1

Related Questions