title: Pass host environment variables to dockerfile
body: <p>How can I pass a host environment variable (like user and hostname) to a dockerfile?</p>
  
  <p>For example, if my username is <code>taha</code>:</p>
  
  <pre><code>echo $USER
  taha
  </code></pre>
  
  <p>How do I write my Docker file to get the same output?</p>
  
  <pre><code>FROM centos:centos7   
  ARG myuser=$USER  
  CMD echo $myuser
  </code></pre>