Merge pull request #4691 from tianon/relative-workdir

Add proper support for relative WORKDIR instructions
This commit is contained in:
Michael Crosby
2014-03-19 09:57:23 -07:00
3 changed files with 37 additions and 2 deletions
+10 -1
View File
@@ -407,7 +407,16 @@ the image.
The ``WORKDIR`` instruction sets the working directory for the ``RUN``, ``CMD`` and
``ENTRYPOINT`` Dockerfile commands that follow it.
It can be used multiple times in the one Dockerfile.
It can be used multiple times in the one Dockerfile. If a relative path is
provided, it will be relative to the path of the previous ``WORKDIR``
instruction. For example:
WORKDIR /a
WORKDIR b
WORKDIR c
RUN pwd
The output of the final ``pwd`` command in this Dockerfile would be ``/a/b/c``.
3.11 ONBUILD
------------