title: $PWD is not set in ENV instruction in a Dockerfile
body: <p>I have a Dockerfile starts like this:</p>
  
  <pre><code>FROM ubuntu:16.04
  WORKDIR /some/path
  COPY . .
  ENV PYTHONUSERBASE=$PWD/pyenv PATH=$PWD/pyenv/bin:$PATH
  RUN echo "PWD is: $PWD"
  RUN echo "PYENV is: $PYTHONUSERBASE"
  </code></pre>
  
  <p>I found <code>$PWD</code> (or <code>${PWD}</code>) was not set when I run <code>docker build</code>, as a comparison, <code>$PATH</code> was correctly expanded.</p>
  
  <p>Moreover, <code>$PWD</code> in <code>RUN</code> has no problem (It prints <code>/some/path</code> in this case)</p>
  
  <p>So the output of the given Dockerfile would be:</p>
  
  <pre><code>PWD is: /some/path
  PYENV is: /pyenv
  </code></pre>
  
  <p>Could somebody tell me why <code>$PWD</code> is so special? I guess it may be related to the behaviour of <code>WORKDIR</code> but I have no clue about that.</p>