title: Docker copy file to host from within dockerfile
body: <p>I am writing a <code>Dockerfile</code> to build an application.  I know that you can copy files out of the container manually with </p>
  
  <pre><code>docker cp &lt;containerId&gt;:/file/path/within/container /host/path/target
  </code></pre>
  
  <p>(see <a href="https://stackoverflow.com/questions/22049212/copying-files-from-docker-container-to-host">Copying files from Docker container to host</a>), but I would like to just run </p>
  
  <pre><code>docker build
  </code></pre>
  
  <p>and have it dump the build artifacts created by my <code>Dockerfile</code> somewhere on my host file system.</p>
  
  <p>Is there a command I can use within the Dockerfile to copy out of the container and into the host?  Like the opposite of <code>COPY</code>?</p>