Sunday, 17 July 2016

WORKDIR $HOME in Dockerfile does not seem to work

I have a Dockerfile that contains two WORKDIR statements (amid other ones) like so:

WORKDIR /tmp
WORKDIR $HOME

I would expect pwd to be /root (i.e. $HOME for root) afterwards, but it remains at /tmp. Am I making an obvious mistake here? Is there a better way for restoring pwd to its "original" value.



from Recent Questions - Stack Overflow http://ift.tt/29MNiQc
via https://ifttt.com/ IFTTT

No comments:

Post a Comment