title: Docker how to ADD a file without committing it to an image?
body: <p>I have a ~300Mb zipped local file that I add to a docker image.  The next state then extracts the image.</p>
  
  <p>The problem is that the ADD statement results in a commit that results in a new file system layer makes the image ~300Mb larger than it needs to be.</p>
  
  <pre><code>ADD /files/apache-stratos.zip /opt/apache-stratos.zip
  RUN unzip -q apache-stratos.zip &amp;&amp; \
      rm apache-stratos.zip &amp;&amp; \
      mv apache-stratos-* apache-stratos
  </code></pre>
  
  <p><strong>Question</strong>: Is there a work-around to ADD local files without causing a commit?</p>
  
  <p>One option is to run a simple web server (e.g. <code>python -m SimpleHTTPServer</code>) before starting the docker build, and then using <code>wget</code> to retrieve the file, but that seems a bit messy:</p>
  
  <pre><code>RUN wget http://localhost:8000/apache-stratos.zip &amp;&amp; \
      unzip -q apache-stratos.zip &amp;&amp; \
      rm apache-stratos.zip &amp;&amp; \
      mv apache-stratos-* apache-stratos
  </code></pre>
  
  <p>Another option is to extract the zipped file at container start up instead of build time, but I would prefer to keep the start up as quick as possible.</p>