ping hostnames between containers

Hi all ;

I’m running a TS-464 with Container-Station.

I’ve setup several containers (ha, grist, lldap, authelia ..) , all addressed by a caddy container as reverse proxy. They’re all directly installed in CS as “containers”, not via a compose file.

Everything worked fine, except i had to reverse proxy to the 10.0.3.x addresses, as the hostnames did’nt work. No problem with that, till i rebooted the NAS for firmware update : all the containers changed their IP .. i have to reconfigure Caddy with the new IPs …

I thought docker had a sort of “dns resolver” documented with the containers hostname in the same network, so i could reference them in Caddy by hostnames. Have i missed something ?

Installing an internal dns server won’t work either, if containers ip continue changing a each reboot.

Another option would be set static IPs for the containers , but couldn’t find where to do that (or maybe via ssh in command line ..)

Anyone could share good practices ?

regards,
Xavier

Well, by default the containers use DHCP. I was just looking and I don’t know if there’s a way to set a fixed IP address for the containers. There is not in the container setup. Maybe you have to do it in Compose.

You can put the containers into Bridge mode where they then are attached to a particular network adapter. You can then assign them fixed IPs.