Error Windows container is unavailable via localhost

0 votes

I am trying to set up a Docker for Windows container to build and host a simple  website using lite-server and Sphinx.

Run the container,

$ docker run -it -p 8080:8080 -v "$(pwd):C:\src" website

start lite-server.

$ yarn serve

The website is available from the container's IP address so I know lite-server is serving the content, but I cannot access the content form http://localhost:8080.

How can I expose the website via localhost:8080?

Sep 3, 2018 in DevOps & Agile by Sophie may
• 10,610 points
595 views

1 answer to this question.

0 votes

This is because,

containers and their ports are only accessible via the NATed IP address.
answered Sep 3, 2018 by Sophie may
• 10,610 points

Related Questions In DevOps & Agile

0 votes
1 answer
0 votes
1 answer

Docker for Windows error - Connecting a SQL Server database to a Docker container

The latest express sqlserver images with setting ...READ MORE

answered Dec 4, 2018 in DevOps & Agile by Tyrion anex
• 8,700 points
1,109 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,090 points
2,491 views
0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP