Skip to Content
Navigation:

A stick figure smiling

Here's a preview from my zine, How Containers Work! If you want to see more comics like this, sign up for my saturday comics newsletter or browse more comics!

Image of a comic. To read the full HTML alt text, click "read the transcript".

browse more comics! get the zine!
read the transcript!

containers often get their own IP address

wordpress container 1: I’m running WordPress at 172.17.2.3:8080!

wordpress container 2: I’m using 172.17.0.49:8080!

containers use private IP addresses

These are reserved for private networks (RFC 1918).

This is because they’re not directly on the public internet.

for a packet to get to the right place, it needs a route

packet 172.16.2.3: hi! I’m here!

router, represented by a box with a nonplussed expression: I don’t have any entry matching 172.16.2.3 in my route table, sorry!

inside the same computer, you’ll have the right routes

same computer:

$ curl 172.16.2.3:8080
<html>....

different computer:

$ curl 172.16.2.3:8080
.... no reply ....

distributing the right routes is complicated

box with a smiley face: a new container started, 10.2.73.4 should go to X computer now

route table, also represented by a box with a smiley face, thinking: wow these things change a lot

cloud providers have systems to make container IPs work

In AWS, this is called an “elastic network interface” route table

Saturday Morning Comics!

Want another comic like this in your email every Saturday? Sign up here!

I'll send you one of my favourite comics from my archives every Saturday.
© Julia Evans 2024 | All rights reserved (see the FAQ for notes about licensing)