You are signed in. Close

You are signed out. Close

Thank you. Your subscription has started. Close

Thank you. You will get an email when a new comic comes out. Close

We could not confirm your payment. If you paid, use the link "Sign in" at the bottom of the page. Close

Something went wrong on our side. Please try again in a moment. Close

Previous episode Linux namespaces: why a container thinks it is alone

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. 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.Mivathe server8044322nobody here

    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. 2 Meanwhile, the container waits patiently at port 8080, on its own network. Nothing joins that door to port 80 of the server.inside the server808080the containerI'm atport 8080!

    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

Next episode Image layers: what a Docker image is made of

Share this comic

More comics