Question
Docker-like private DNS name lookup for private IPs?
I’m relatively new to nearly everything with web development, but I’ve been playing around with Docker recently. While my local environment is basically a bunch of Docker images interconnected, my actual production environment is going to spread out among multiple servers so I can better load balance and scale.
My question is, docker allows you to use the name of the docker image as a stand-in for IP addresses, since it has an internal DNS server that will resolve them to the correct IP on the subnet.
For example, using redis:6379
instead of [redis server IP]:6379
because internally, ‘redis’ resolves automatically to the correct private IP via Docker’s DNS.
So what I’m wondering is, does Digitalocean offer an inbuilt functionality for something like this? Or will I have to host my own DNS server for my droplets that redirects to their private IP’s as needed?
Thanks
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×