title: Copy files from host system to docker image before starting the container
body: <p>I'm trying to build RPMs inside container <code>first</code> and then copy these RPMs to the host machine using the <code>docker cp</code> command.</p>
  
  <p>Now, I need to install these RPMs in the <code>second</code> container. I can simply do <code>docker cp</code> to copy the files into the running <code>second</code> container. </p>
  
  <p>But, the problem is I'm trying to pull the image, execute a command (not written by me) that <strong><em>runs the docker container, runs various commands inside the container and removes the container</em></strong>. Since this step is automated, I can't run the container and then copy the file. I have to preload the RPMs into the image that I pulled already. Is there a way to achieve this?</p>