I want to add a domain entry in /etc/resolv.confmy docker container.
Here is my dockerFile
FROM tomcat:8.0.20-jre7
VOLUME /tmp
RUN echo "domain com.example.com" >> /etc/resolv.conf
EXPOSE 8080
I tried both echo, and sed. c sed, I get an error during the build.
sed: cannot rename /etc/sed6LcoES: Device or resource busy
but with container design echosuccessfully. however, when I get into the container, I donโt see that my domain is added to /etc/resolv.conf.
why doesn't it work?
NOTE. I have dns-searchone working by passing during run argument
docker run -p 8080:8080 --dns-search=com.example.com -d --name myawesome my/myawesome:latest
but I'm interested in working dockerFile.
source
share