I want to set my
nameserver 18.104.22.168 nameserver 22.214.171.124
My Dockerfile has the following line:
ADD resolv.conf /etc/resolv.conf
This added file contains the correct nameservers.
My Docker host's
/etc/resolv.conf contains the correct information.
I'm running the container like this:
docker run -itd --cap-add=NET_ADMIN --device /dev/net/tun \ -v /home/pi/share/ovpn:/ovpn \ --privileged --network=internet_disabled --name vpn-client \ --dns=126.96.36.199 \ openvpn-client_nat-gateway /bin/bash
Despite all of this, the container gives this output:
root@642b0f4716ba:/# cat /etc/resolv.conf nameserver 127.0.0.11 options ndots:0
It's only after I change the resolv.conf manually from within the container (or with docker exec) that it looks right.
I'd rather avoid having to fix it with an exec command. Anybody have an idea what's going on here?