When building a docker image, I have a curl command which pulls down a file as such:
RUN curl -L http://files.mycompany.com/ -o file.war
files.mycompany.com is a server accessable only from within the company network. I can reach this server from my host machine, but not from within the docker container if I use the name (IP works fine).
This works: RUN ping google.com
This works: RUN ping 10.3.2.1
(IP of files.mycompany.com)
This does not work: RUN ping files.mycompany.com
(translates the name to another IP than if I ping the same server from the host machine)
Something is not setup correctly on my machine since building the container from another dev computer on the same network works fine. It's like the docker interface does not receive the DNS records from the local network?
I am running Ubuntu 17.04.