Here is my Dockerfile
FROM javamachine_0.1.2
MAINTAINER Meiram
RUN /report/report.sh start
ENV LANG C.UTF-8 ENV LANGUAGE C.UTF-8 ENV LC_ALL C.UTF-8
RUN echo "nameserver 192.168.1.100" > /etc/resolv.conf
COPY resolv.conf /etc/resolv.conf
EXPOSE 9090
when creating container directive docker run --dns also do not change entries in /etc/resolv.conf
How to change entries in /etc/resolv.conf permanently?
if you use --dns you may need to remove those lines:
RUN echo "nameserver 192.168.1.100" > /etc/resolv.conf
COPY resolv.conf /etc/resolv.conf
also,
try to swap the lines too.. COPY command will override the previous one.