title: Get environment variable value in Dockerfile
body: <p>I'm building a container for a ruby app. My app's configuration is contained within environment variables (loaded inside the app with <a href="http://github.com/bkeepers/dotenv">dotenv</a>).</p>
  
  <p>One of those configuration variables is the public ip of the app, which is used internally to make links.
  I need to add a dnsmasq entry pointing this ip to 127.0.0.1 inside the container, so it can fetch the app's links as if it were not containerized.</p>
  
  <p>I'm therefore trying to set an <code>ENV</code> in my Dockerfile which would pass an environment variable to the container.</p>
  
  <p>I tried a few things.</p>
  
  <pre><code>ENV REQUEST_DOMAIN $REQUEST_DOMAIN
  ENV REQUEST_DOMAIN `REQUEST_DOMAIN`
  </code></pre>
  
  <p>Everything passes the "REQUEST_DOMAIN" string instead of the value of the environment variable though.
  Is there a way to pass environment variables values from the host machine to the container?</p>