1
I'm running a Docker container which clones some git repositories and builds a project inside of itself.
It clones code from 2 different repositories: one is public github.com
and the other one is private my.companys.github.enterprise.net
and is only accessible through VPN.
In my resolv.conf
I have 2 nameservers: one for public services and one for VPN:
nameserver 8.8.8.8
nameserver 10.10.3.3
When I try to clone repositories inside my docker container it can only resolve github.com
repositories and can't resolve my.companys.github.enterprise.net
repositories.
If I switch around the lines in my resolv.conf
, then it can only resolve my.companys.github.enterprise.net
and not the github.com
ones.
Is there a way to allow Docker to resolve both links to repositories using 2 different nameservers from resolv.conf
instead of just trying the first one?
1Maybe you can set in your company's DNS a forwarder (the internet DNS as a forwarder I mean) and setting it in first place you can resolve all. If not possible to modify the company DNS server... not sure how to solve. – OscarAkaElvis – 2016-12-15T17:31:38.383
If the first nameserver answers AT ALL (even with "I don't know that name/address"), then the next one will not be checked. @OscarAkaElvis' suggestion in his comment is spot-on. – Ƭᴇcʜιᴇ007 – 2016-12-15T18:56:54.437