How do I access an application that is running in a Docker container?

Asked

Viewed 23 times

1

is my first post here, I hope you can help me.

Environment: Windows 10 Angular Docker for windows git bash

Problem: I’m learning to use the Docker. To make the proof of concept, I created an angular application using the command ng new.

The application was created successfully. When I create the container, I am using the command docker run -p 8080:4200 -v //c/Users/User01/Desktop/EXP://var/www -w //var/www node npm start and the container is created smoothly.

The problem is that when I call http://localhost:8080 I’m not getting any answers... However, calling Curl to port 4200 inside the container, I have answer.

It seems that the mapping is not being done well.

Someone can help me?

  • which Docker image you are using?

  • please also make dockerfile available for analysis

  • I’m not wearing a dockerfile yet. I am using the Node image, passing the files to the volume associated with the container and running the npm start command on Working directory. Everything works a lot less container access from the localhost...

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.