This one had me laughing out loud. I have feelings about whoever decided this feature was a cool and good thing to have, and I like to imagine they hold a particular grudge against people who use Docker. 
First of all, disclosure: Iām actually using podman (5.5.0 on Rocky Linux). That aside, when setting up Caddy to reverse-proxy silverbullet, I set it to reverse-proxy silverbullet:9002
(Iāve set the port to that for reasons that are mysterious and unfathomable (idrk why, lol)).
However, because of some⦠interesting OS feature, it seems that instead of my local container named silverbullet
, silverbullet
instead is resolved to the IP of the (old?) silverbullet.dev site. (ping silverbullet
executed on the host system exhibits the same behavior.)
This is my plea for aid in ridding my server of⦠whatever that feature is. /laughing
Okay. I think I figured it out. Might be worth keeping this for posterity because I think itās hilarious and not intuitive at all to figure out why it happens and how to debug it.
So⦠because the hostname of my machine is monospacedmagic.dev
, during the installation, the RHEL-based Rocky Linux added search dev
to /etc/resolv.conf
as the first line⦠This will try to resolve hostnames by first checking if ā$name.devā resolves, and then letting other resolvers try⦠
So, the solution is: Disable NetworkManagerās DNS management, then edit /etc/resolv.conf
and delete the line that looks like search tld
. Then reboot your server. Now your container hostnames should resolve properly. 
Or, even better: Ignore Red Hatās advice (they advise you set your machineās hostname to a fully qualified domain name) and set your machineās hostname to something that does not include a dot.
Though this is best done before installing the OS.