浏览代码

WORKDIR is like calling mkdir - but we've not told people

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Sven Dowideit 9 年之前
父节点
当前提交
c937b43abd
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      docs/reference/builder.md

+ 2 - 0
docs/reference/builder.md

@@ -1021,6 +1021,8 @@ and for any `RUN`, `CMD` and `ENTRYPOINT` instructions that follow it in the
 
 The `WORKDIR` instruction sets the working directory for any `RUN`, `CMD`,
 `ENTRYPOINT`, `COPY` and `ADD` instructions that follow it in the `Dockerfile`.
+If the `WORKDIR` doesn't exist, it will be created even if its not used in any
+subsequent `Dockerfile` instruction.
 
 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`