title: Does Docker update contents of volume when mounted if changes are made in Dockerfile?
body: <p>I have Jenkins running in a Docker container.  The home directory is in a host volume, in order to ensure that the build history is preserved when updates to the container are actioned.</p>
  
  <p>I have updated the container, to create an additional file in the home directory.  When the new container is pulled, I cannot see the changed file.</p>
  
  <pre><code>ENV JENKINS_HOME=/var/jenkins_home
  RUN mkdir -p ${JENKINS_HOME}/.m2
  COPY settings.xml ${JENKINS_HOME}/.m2/settings.xml
  RUN chown -R jenkins:jenkins ${JENKINS_HOME}/.m2
  VOLUME ["/var/jenkins_home"]
  </code></pre>
  
  <p>I am running the container like this:</p>
  
  <pre><code>docker run -v /host/directory:/var/jenkins_home -p 80:8080 jenkins
  </code></pre>
  
  <p>I had previous run Jenkins and so the home directory already exists on the host.  When I pull the new container and run it, I see that the file <code>.m2/settings.xml</code> is not created.  Why is this please?</p>