title: Can i reference a Dockerfile in a Dockerfile?
body: <p>I have a Dockerfile that creates the build image I want to use here: <code>~/build/Dockerfile</code> then I use a standard image to deploy </p>
  
  <p>The image built from <code>~/build/Dockerfile</code> is not Published anywhere, I know I can simply copy paste the one Dockerfile into the other, however it would be better if I could simply reference it so..</p>
  
  <p>Is it possible to somehow reference the Dockerfile itself when deploying? </p>
  
  <p>like so:</p>
  
  <pre><code>FROM [insert something that creates an image using ~/build/Dockerfile] as build-env
  ... build operations ....
  
  FROM some-image
  COPY --from=build-env /built .
  ENTRYPOINT [blah]
  </code></pre>
  
  <p>This won't work but is there some other way to accomplish this?</p>