1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #27863 from Microsoft/jjh/clarifyworkdir

Windows: Clarify WORKDIR in docs
This commit is contained in:
Sebastiaan van Stijn 2016-10-28 14:07:03 -07:00 committed by GitHub
commit beccf0f898

View file

@ -1268,6 +1268,19 @@ For example:
The output of the final `pwd` command in this `Dockerfile` would be
`/path/$DIRNAME`
On Windows, `WORKDIR` behaves differently depending on whether using Windows
Server containers or Hyper-V containers. For Hyper-V containers, the engine
is, for architectural reasons, unable to create the directory if it does not
previously exist. For Windows Server containers, the directory is created
if it does not exist. Hence, for consistency between Windows Server and
Hyper-V containers, it is strongly recommended to include an explict instruction
to create the directory in the Dockerfile. For example:
# escape=`
FROM microsoft/nanoserver
RUN mkdir c:\myapp
WORKDIR c:\myapp
## ARG
ARG <name>[=<default value>]