title: How can I copy a file to a docker image?
body: <p>I am pulling a docker image and run this docker image on a Linux environment like</p>
  
  <pre><code>docker pull ${IMAGE}
  # I need to copy the file BEFORE I run the thing
  docker run ... ${IMAGE}
  </code></pre>
  
  <p>But how can I copy a file from the host to the docker image that I am about to run, so that when it runs it can use this file from the host? </p>
  
  <p>I looked at <code>docker cp</code> but this seems to use a docker <em>container</em> ID which I do not have. I also do not want to create a new image. I need the docker container have access to one single file on the host system.</p>
  
  <p>Or the other way around also would work: How can I access a file on the host system from within the docker container?</p>