This is very similar to the following question, however the solution/answer to this previous question doesn't solve the problem.
In my case I'm not connecting to MySQL specifically, however trying to resolve www.google.com results in the same UnknownHostException only within the container. When I run from just the JVM and not within a container on my MAC, there's no issues in resolving.
Same scenario where: InetAddress ip = InetAddress.getByName("www.google.com");
I've tried the following suggested fix:
RUN echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf
as well as..
RUN echo "hosts: files dns" >> /etc/nsswitch.conf"
Neither seem to do the trick..
Are there any other suggestions out there, anything I'm missing in addition to the above suggestions?
Thanks in advance.