I am using Docker for Mac . I have a container that starts the server, for example, my server runs on port 5000. I set this port to Dockerfile
When my container is running, I connect to this container and check if this server is working or not by running the command below and seeing that it returns data (a bunch of html and javascript).
wget -d localhost:5000
Notes, I run this container and also publish the port outside of the command:
docker run -d -p 5000:5000 <docker_image_name>
But on the docker host (my poppy works with El Capitan) I open chrome and go to localhost:5000 . This does not work. Just a small note, if I go to any arbitrary port, for example localhost:4000 , I see an error message from chrome, for example:
This site can't be reached localhost refused to connect.
But the error message for localhost:5000 :
The localhost page isn't working localhost didn't send any data.
So it seems that I set the work "a little", but something is wrong. Please tell me how to fix it.
source share