What happens when you put your app in a Docker container
Port publishing: how a request from outside reaches a container
A container can run perfectly and still answer nobody. A request from the internet reaches the server, but it never gets into the container. One option of docker run decides if it does.
-
1
The ways in are numbered doors of the server, called ports. Miva's web address starts with http, so her request goes to port 80, where nobody waits.
-
2
Meanwhile, the container waits patiently at port 8080, on its own network. Nothing joins that door to port 80 of the server.
The rest of this episode is for subscribers
Subscribe to read every premium episode. You can cancel when you want.
Paid yearly: $99 instead of $119.88