Apoorv Tyagi Thanks for the great article. Wondering what is the use of this docker run -dp 5000:5000 hello-python. Since we specify that we want to expose the port 5000 in dockerfile.
Kannan 5500 is the container port that we published. Publishing ports means mapping container ports to the host application(my flask app in this case) so that the ports are available to services outside of Docker container.
In order to do that the syntax is docker run -p <your container port>:<host app exposed port><imageName>
This means anyone connecting to the host(flask app) over port 5000 will be routed to my container via port 5500.
Nimrod Kramer
Co-Founder, CEO @ daily.dev
Congrats on being featured on daily.dev! Good job there.