title: Is it possible to get host's environment variable in Docker container?
body: <p>My app uses some <em>secrets</em>, like password to database. I don't want to publish it inside any Docker file or any other app's file.</p>
  
  <p>Is it possible to set environment variable on host machine, then run on this host Docker container with my app and use the host's environment variable inside of Docker image?</p>
  
  <p>I would like to be able to get in my Docker container something like:</p>
  
  <pre><code>$ echo $DB_PASSWORD
  </code></pre>
  
  <p>But the DB_PASSWORD would be set on host machine.</p>
  
  <p>Are the environment variables shared between host machine and its containers?</p>