I have many stacks with many containers. And after some reconfigurations Docker assign new IPs for containers.
Ok, inside this network we can refer services to each other by service name or assigned alias. But what if I want to access that service name from host not at that network? That is allowed only by IP.
For example docker compose define network office-net
. On that network we have OpenVPN configured, thus clients outside of office-net
can reach it via VPN server. Those clients are configured to use PowerDNS server as theirs DNS server.
Could it be possible to configure Docker to export info about assigned for containers IPs into PowerDNS server? eg. gitlab.domain
is at 192.168.7.3
, mail.domain
is at 192.168.7.4