Blog
Every post, newest first, each with examples you can run yourself.
Finding where a request breaks
A request passes the name, the route, the port, the padlock and the answer. Each tool checks one of these steps. Go in order and stop at the first failure, and curl's error code and timings show where to look.
One front door for many programs
A reverse proxy is one address in front of many programs. It ends the client's connection and opens its own. It takes turns between the programs, but a health check that only proves the port is open sends requests into a broken one.
Where a container's network ends
A container has its own network on a private street inside the host. Docker joins that street to the outside with two rewrite rules, one for traffic that leaves and one for each published port. The second rule is applied before the host's firewall rules for incoming traffic.
Why your address is borrowed
A machine does not own its address. A DHCP server lends it, usually with a gateway and a resolver, and NAT rewrites it on the way out. A server on the internet sees the address of the translator, not yours.
What the padlock proves
HTTPS wraps the plain text of part 4, so nobody on the path can read it or change it unnoticed. The padlock proves that the name you typed matches a certificate signed by someone your machine trusts. It does not prove that the site is honest.
HTTP is just text on a connection
A web request is a few lines of plain text sent over an open connection, and the answer is a few more lines. Once you can read them, the output of `curl -v` is easy to follow. The versions of HTTP change how many requests share one connection.
What TCP promises and what it does not
TCP delivers your data in order, or it reports an error. How soon it reports depends on timers you did not set. The two errors, refused and timed out, show two different ways a connection fails.
How a name becomes an address
A packet needs an address, but people type names. DNS is a chain of questions, and every answer is kept in a cache until its time limit ends, so a changed record does not change everywhere at once.
A packet only knows the next step
A machine has no map of the internet. For every packet it asks who should get it next. The most specific route answers, and a wrong route changes only the addresses in its range.
Where the shipping container picture breaks
The whole port in one picture, from the packing list to the gate. The picture stops being true in two places. Every container shares the host's kernel, and every container needs hardening of its own.
A compose.yaml for a real server
The compose file from part 6 works on a laptop. On a server it shows its password, lets logs fill the disk and stays stopped after a crash. A few lines fix that. An override file keeps the laptop setup easy to work with.
What a good Dockerfile looks like
A first Dockerfile works, and ships a 1.38 GB image that runs as root and takes ten seconds to stop. A build stage, a non-root user and the exec form fix all three.
Why Compose is more than a shortcut
A real app is several boxes that need each other. Compose describes them in one file, with their trailers, their gates and their start order. That plan stays where you can read it next month.
What volumes and ports are for
A container's own files are deleted with the container, and nothing outside can reach the container until you open a gate. A volume keeps the data. A published port opens the gate, and its address decides who can come in.
What actually happens when you type docker run
docker run only sends a message. We look at who receives it, who asks the kernel for the blindfold and the limit, and why anyone who can send that message is root.
Why latest is not a version
A sealed box waits in a depot until a server asks for it by name. A tag can point at a different image tomorrow, and a digest always names exactly one image.
What's inside a Docker image
An image is a sealed box made of stacked layers. The order of lines in your Dockerfile decides how long a rebuild takes, and a deleted secret is still inside the image.
A container is just a process
A container is an ordinary process on your machine with a blindfold and a ration. What that means, and why a container starts in a few hundred milliseconds while a full Linux VM on a laptop takes tens of seconds to boot.
New posts by email
One email when a post ships, about twice a month. Nothing else, and one click to leave.
Latest: Finding where a request breaks · RSS