dotcloud/docker — pull request #1175 by fmd (2013-07-09 22:13:31+00:00)
Title: CmdAdd and CmdEnv now respect Dockerfile-set ENV variables

Fixes #1136

Notes:

This changes the type of environment variable options.
The following dockerfile has the output that follows it.

#Dockerfile. Directory also has a directory named 'testdir' which contains a file named 'myfile'.
FROM ubuntu:12.10
ENV DESTPATH /foobar
ENV ORIGPATH ./testdir
ENV FOOPATH $ORIGPATH/dir${DESTPATH}/dir
ADD $ORIGPATH $DESTPATH/$ORIGPATH
RUN echo $FOOPATH

$ ls / | grep foobar
foobar
$ cd /foobar && ls
testdir
$ cd testdir && ls
myfile