Problem:
From the windows host machine. Port mapping/exposing does not work.
Container app is not reachable.
curl http://localhost:PORT (127.0.0.1 / 0.0.0.0)
-> Could not get any response
curl http://DOCKER-IP:PORT (127.17.0.1 / 127.17.0.2)
-> Could not get any response
curl http://DOCKER-SUBNET-ADDRESS:PORT (10.0.75.0)
-> Could not get any response
Setup:
Windows10 host system + Docker container (with simple helloworld python flask app)
Docker container is running. Inside the docker container the flask app behaves as expected.
Reproduction:
get the hello world repo
git clone https://github.com/shekhargulati/python-flask-docker-hello-worldBuild and run docker container
docker build -t simple-flask-app:latest . docker run -d -p 5000:5000 simple-flask-app --name simple-flask-appexec into container & check flask is running
docker exec -it simple-flask-app apt-get install curl curl http://127.0.0.1:5000-> See
200 OK + Flask is running(or some text like this)Exit docker container
exitcurl on your windows host machine
curl http://127.0.0.1:5000-> See
Could not get any response(or something like this)