I can't access docker from outside the container [duplicate] I can't access docker from outside the container [duplicate] flask flask

I can't access docker from outside the container [duplicate]


The EXPOSE instruction does not actually publish the port. You also have to also tell docker to forward connections to that port. When running you would do docker run -p 80:5000 my_docker_image and then traffic inbound on port 80 will be forwarded to port 5000 within the docker container. Alternatively you could forward port 5000 to 5000 in the docker image if you don't want to listen on port 80.