u/KGBsurveillancevan

▲ 1 r/docker

Any debugging / general advice on how I could have caught this weird error?

I just spent a whole day on a very irritating gotcha, and I'm looking to see if there's a big-picture approach that can keep me from ending up here again.

Fairly new to Docker. Working on containerizing a web app with a couple different moving parts. Got the frontend working inside of a Caddy image, got it pushed to my DigitalOcean droplet, but then it just sat there, not acknowledging or even rejecting any requests. I figured out that it had crashed because it tried to serve to a busy port, but after clearing that up it still wasn't working. Looked in the logs, and there were some opaque errors about failing to connect to the internet (I've since deleted those logs, otherwise I'd share).

I threw these logs at an LLM, and after some arguing, it asked me to run nslookup web1 inside of the container. That returned:

Server:     127.0.0.53
Address:    127.0.0.53#53

** server can't find web1: SERVFAIL

From this output, the LLM suggested that:

  • Caddy, not receiving any defaults for resolv.conf, had inherited from the droplet's resolv.conf, which listens on port 53, which is just a loopback; thus, no connection.
  • The fix was to add dns: [1.1.1.1,8.8.8.8] to the compose file, or alternatively to the droplet's daemon.json file to apply for the whole droplet.

Did this, rebuilt the container, and sure enough, that was exactly the issue.

And now I'm questioning everything. How the hell would anyone have caught this? Did I overlook a search result or documentation that explains exactly what I saw? Do I not know enough about Linux to be using Docker? Am I a soydev????

For real though, I'd appreciate any advice. I could've easily spent a week on this if I hadn't used AI, but I wanna gain the knowledge to be more self-reliant. Did I miss something critical, or is this just one of those things that you don't learn til you get burned?

reddit.com
u/KGBsurveillancevan — 7 days ago
▲ 0 r/webdev

How are you researching / learning new tools without using AI? (genuinely asking)

For context, I’m a solo freelancer, and I got started after the AI boom. Had a couple of projects, but haven’t worked on a team since I was in school. I’ve managed to avoid the “temptation” of vibe coding in almost all aspects - I’ve tried it, and I genuinely just don’t like having a bunch of code thrown at me that I need to review and sign off on without having iterated on it myself. Coding is fun, I like doing it, and I like being responsible for it.

What I don’t like, and what I’m struggling with, is research and debugging. I do my best to read through documentation, search for GitHub issues and stackoverflow answers, and puzzle things out on my own, but the Easy Answer Generator is right there, and I end up using it for the hardest problems. Maybe that’s fine if I’m just trying to get through a workday, but I’m trying to learn and hone a craft here. Cringe, I know.

It feels like there have been problems with asking questions on the internet for a long time. Stackoverflow threads that ask “how do I do X with Y?” and the answers are all “don’t use Y” or “why are you trying to do X”. Add on poorly written documentation and the web dev ecosystem being so convoluted… it feels nice to have a tool that can cut through the fog and point straight to the problem (with like 70% accuracy). I spent a full day debugging a particular extension for a particular CMS in Docker - finally threw the error logs at Claude and it pointed out the problem (and an incorrect solution) immediately.

But I don’t wanna rely on that. I’ve got a lot of ethical issues with AI, and with its insane operating costs, I don’t think it’s gonna be widely available forever.

So I’m just looking for resources, techniques, anything to help approach convoluted or opaque problems. Maybe I just need to ask for help from people more often? Would love to hear y’all’s perspective.

reddit.com
u/KGBsurveillancevan — 1 month ago