Greetings to all in this beautiful beginning of year 2017
I have a "micro-service" application build with docker-compose and orchestrating by docker Swarm on an Azure Container Service Cloud. The version of Docker on Azure is 1.12.5.
I’ve set up a site-to-site VPN to allow some applications to connect herself with some servers hosted in our place. VPN connection work like a charm. I can ping the private DNS and other servers from a virtual machine in Azure Cloud. What is annoying, is that docker-compose did not take care of the definition of an other DNS Server. In my docker compose, I’ve defined the IP of our private DNS and the two IP of Google public DNS :
version: '2'
services:
myApp:
build: something
dns:
- X.X.X.X
- 8.8.8.8
- 8.8.4.4
As you doubt, this does not work. The /etc/resolv.conf of myApp does not contain these IPs.
I’ve try to run myApp with this kind of command:
docker run myAppContainer –dns X.X.X.X …
And by this way the myApp container use, as I want, our private DNS.
I saw a lot of post who give a simple solution by editing docker’s default value on the host(/etc/default/docker). But with the setup I have in Azure, I’can’t change anything in the virtual machines who host the Swarm agent.
So, I really need your help.