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,620 points
1,537 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,620 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,690 points
2,349 views
+2 votes
1 answer
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
7,713 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