title: Create dynamic environment variables at build time in Docker
body: <p>My specific use case is that I want to organize some data about the EC2 instance a container is running on and make i available as an environment variable.  I'd like to do this when the container is built.</p>
  
  <p>I was hoping to be able to do something like <code>ENV VAR_NAME $(./script/that/gets/var)</code> in my Dockerfile, but unsurprisingly that does not work (you just get the string <code>$(./script...</code>).</p>
  
  <p>I should mention that I know the <code>docker run --env...</code> will do this, but I specifically want it to be built into the container.</p>
  
  <p>Am I missing something obvious?  Is this even possible?</p>