Wink Pings

AI Can Write Dockerfiles Now, but the 502 Is Still Unfixed

Yoshik posted a five-page Docker diagram set and also wrote a more pointed long-form piece: AI has made generating code cheaper, but it hasn't made production failures cheaper. The five pages can get you in the door, but pinpointing failures is still on you.

Yoshik posted a five-page Docker primer on X, with the very straightforward title 'docker in 5 pages.' Original link: https://x.com/AskYoshik/status/2127025352488964570. The images are below in order.

image

image

image

image

image

The five pages are good for basic literacy. On the same day, Yoshik linked in a reply to a long-form piece he wrote titled The Most Important Tech Skill Of The AI Era (It's Not Coding). The core point doesn't conflict with Docker: writing code has become easier, while understanding why systems fail has become scarcer.

AI can spit out a working Dockerfile, Terraform config, or CI workflow in seconds. In the past, a junior SRE or DevOps engineer might have spent hours on it. Yoshik's judgment is that generating code has become cheaper, but deploying and running code has not. More code gets written, more code runs in production, and more failures happen.

What does it look like when an incident hits? It's Friday, and users say the app won't load. Monitoring is full of 502s. A 502 is an error returned to the client by an intermediary service; it only says that some layer failed. It doesn't say whether the app is down or whether something went wrong between the proxy and the network. If you paste the 502 straight into an LLM, the model will probably tell you: increase the upstream timeout, restart the service, check the application code. It all sounds right, but it may not help with this particular outage. The only context you gave it is a single 502; it doesn't know which layer is broken.

In the article, Yoshik cites the order from the Google SRE handbook: first analyze the problem report, then check logs, generate test requests, and then form hypotheses. An experienced engineer will first confirm whether the request reached the infrastructure, whether the 502 came from the proxy or the application, and what the logs from the relevant time window say. After localizing it, they hand the logs and config to an LLM for analysis. Only then is the LLM a second opinion, not the first responder.

He calls this habit Underneath thinking: first ask what the expected behavior is, where the failure occurs, and what information you have that can identify it. Only then do you guess at causes and fixes. In the short term, this slows you down. In the long term, it keeps you from restarting services in the wrong place.

The article gives five steps. Step one: when something goes wrong, read the error and logs first; don't rush to paste them into Google or an LLM. Yoshik uses the IPinfo example: in September 2025, an expired TLS certificate caused a 2-hour-36-minute outage. The postmortem found that the certificate renewal job had been failing the whole time, and the logs recorded it—but no one was monitoring those logs.

Step two: ask one Underneath question every day. When you visit a website, how does DNS resolve, at what step does the TLS handshake happen, who does the load balancer forward the request to, and how does the application respond? Every link in the chain can fail, and each can leave logs in different places.

Step three: deliberately break something every week. Kill a process, point a domain at the wrong IP, issue a certificate that expires in a day, fill up a disk. First observe the errors and logs yourself, try to fix it for 30 minutes, and then look up a tutorial. Yoshik says this is like a fire drill: don't wait until there's a real fire to look for the exit.

Step four: treat the LLM as a second opinion and give it strong context. Weak context is: how do I fix an nginx 502? Strong context is: my application has been returning 502 for /api/orders since 18:00, the nginx log has a certain error, the application process is still running, but nothing seems to be listening on port 8080, here's what I've tried, and what else could prevent the application from listening on the port? Different information leads to different answer quality.

Step five: teach others. After fixing a problem, write five sentences: the expected behavior, where it failed, what information helped you identify it, how you fixed it, and how to identify it faster next time. If you can't write them, your knowledge still has holes. When you're asked in an interview what incidents you've encountered, these five sentences are more useful than vague talk.

Back to the five-page Docker diagram. It's good for getting started, for quickly building an index, and for getting a rough sense of what the container line looks like. It does not train you to determine which layer is broken when you're staring at a 502. Some people in the comments asked whether five pages are enough to understand all of Docker's concepts, and others asked Yoshik to post Kubernetes and Terraform next. At least in the replies to that tweet, Yoshik didn't answer. The answer depends on what you want: enough to start, not enough to cover your bases. In the AI era, the ability to cover your bases is more expensive.

发布时间: 2026-11-30 01:13