title: Dockerfile pass RUN command result as target for COPY
body: <p>I'm trying to run a command: <code>RUN find / -type d -name 'somefolder'</code> and pass the result as a variable to the <code>COPY</code> command: </p>
  
  <pre><code>RUN find / -type d -name 'somefolder' &lt;---- put into variable
  COPY text.txt variable  &lt;---------- use it
  </code></pre>
  
  <p><code>ARG</code> and <code>ENV</code> don't seem like what I'm looking for. Any ideas?</p>