podman-compose
podman-compose copied to clipboard
Container links require dnsname plugin
I just spent a few hours trying to figure out why the links:
directive wasn't creating DNS entries on each container (running rootless). I eventually figured out that I didn't have the dnsname
plugin installed, and so the podman network created by compose had dns_enabled
set to false
. Once I installed the dnsname
and recreated the network, the network gateway was offering DNS and everything worked.
I'd like to submit a pull request to add a note about this to some documentation, since I just assumed this behavior would work "out of the box" as it does with docker-compose; I'm just not sure which documentation to update. Does a recommendation to install dnsname
belong in the podman install instructions (https://podman.io/getting-started/installation), or somewhere else?
Also, is it worth adding a warning in podman-compose
when we create a network that has dns_enabled
= false and the compose file is also using links:
? That might be nice.
It appears there's been a note about it since Dec 21, 2021, assuming you know what link:
actually does/requires.
The podman-dnsname repo https://github.com/containers/dnsname seems to have been archived, without saying how to use the apparent "replacements".
Edit: it may not be needed any more in podman 5+, but this information seems a bit hard to find...