Incorrect DNS (resolv.conf) setup inside docker images
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
docker.io (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I've encountered a problem after upgrading docker.io to 18.09.2-
In my current setup, I'm using ubuntu 18.04 and connecting from home to a local ISP, and then using a VPN to access some private resources from the company I work for (I use globalprotect as VPN software). I have no connectivity issues whatsoever from my OS. Before connecting to the VPN, my /etc/resolv.conf looks like
# This file is managed by man:systemd-
# A lot of comments cut-out
nameserver 217.169.20.20
nameserver 217.169.20.21
After connecting to the VPN I get this:
search ml.com adminml.com mercadolibre.com
nameserver 10.x.x.x # I edited out the actual IPs, I'm not allowed to share them
nameserver 10.x.x.x
After upgrading to docker.io 18.09.2, when I start a docker container (using docker run, and an ubuntu 16.04 image inside the container), the container has my ISP config (ie the 217.x.x.x nameservers) in its /etc/resolv.conf, while the older version (docker.io 18.06.1) uses the correct VPN configuration (with the search domains and the 10.x.x.x address). This new behaviour makes my containers unusable (given that I expect to access some VPN-only resources from the software running inside them)
Some extra information I found while trying to diagnose this:
- my host system /etc/resolv.conf is a symlink to ../run/
- the "old" (217.x.x.x) resolver configuration seems to be kept at /run/systemd/
- docker 18.09.2 seems to be copying this old configuration; if I 1) edit the /run/systemd/
I expect the old behaviour to be kept, can you confirm it is a bug?
This looks likely to be the result of https:/ /github. com/moby/ moby/pull/ 37485
On the face of it, it looks like your VPN software is stomping over the systemd-resolved config. I admin to finding DNS config fairly confusing but it seems unlikely that this is going to lead to happiness. How are you configuring your VPN?