Docker Community Forums

Share and learn in the Docker community.

DNS not working during BUILD time but working manually


(Drewmullen) #1

When I try to download the java JDK during build its failing saying it cannot find the domain. So I tried running the previous committed layer container created by the same Dockerfile build, ran the command manually and it works fine… any idea what I could try?

“–2017-10-25 15:06:47--
Resolving… failed: Name or service not known.
wget: unable to resolve host address ‘’”

RUN wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie"

Just to be super clear: This command works FINE if I step into the previously commited container and execute the same wget command manually. But when it gets executed during docker build –t tc-common . I get the error above… weird, right?

Docker version 17.06.2-ce, build cec0b72
OS: Mac

(Drewmullen) #2

note about post:

I had to manipulate the error above to post on the forum (“new users cannot submit more than 2 URLs”). I had to remove the ‘.com’ to make them ~not a URL

originally line: “Resolving .com ( .com)… failed: Name or service not known.”

forum submitted line: “Resolving… failed: Name or service not known.”