title: unable to edit /etc/resolv.conf in docker container
body: <p>I want to add a domain entry to <code>/etc/resolv.conf</code> of my docker container.</p>
  
  <p>Here is my dockerFile</p>
  
  <pre><code>FROM tomcat:8.0.20-jre7
  VOLUME /tmp
  #RUN sed -i "s|search local|domain com.example.com|g;" /etc/resolv.conf
  RUN echo "domain com.example.com" &gt;&gt; /etc/resolv.conf
  # Expose ports.
  EXPOSE 8080
  </code></pre>
  
  <p>I tried both <code>echo</code> and <code>sed</code>.
  with <code>sed</code>, I get error during build.</p>
  
  <p><code>sed: cannot rename /etc/sed6LcoES: Device or resource busy</code></p>
  
  <p>but with <code>echo</code> container build and run successfully.
  however, when I get into container, I do not see my domain added in <code>/etc/resolv.conf</code>.</p>
  
  <p>why is it not working?</p>
  
  <p>NOTE: I have got <code>dns-search</code> working by passing during run argument</p>
  
  <p><code>docker run -p 8080:8080 --dns-search=com.example.com -d --name myawesome my/myawesome:latest</code></p>
  
  <p>but I am interested in getting dockerFile working.</p>