Ver código fonte

Merge pull request #10351 from duglin/FixDocsWorkdir

Fix docs so WORKDIR mentions it works for COPY and ADD too
James Turnbull 10 anos atrás
pai
commit
ba8e1673ad
2 arquivos alterados com 3 adições e 3 exclusões
  1. 1 1
      docs/man/Dockerfile.5.md
  2. 2 2
      docs/sources/reference/builder.md

+ 1 - 1
docs/man/Dockerfile.5.md

@@ -195,7 +195,7 @@ or
 
 **WORKDIR**
  -- **WORKDIR /path/to/workdir**
- The WORKDIR instruction sets the working directory for the **RUN**, **CMD**, and **ENTRYPOINT** Dockerfile commands that follow it.
+ The WORKDIR instruction sets the working directory for the **RUN**, **CMD**, **ENTRYPOINT**, **COPY** and **ADD** Dockerfile commands that follow it.
  It can be used multiple times in a single Dockerfile. Relative paths are defined relative to the path of the previous **WORKDIR** instruction. For example:
  **WORKDIR /a WORKDIR b WORKDIR c RUN pwd** 
  In the above example, the output of the **pwd** command is **a/b/c**.

+ 2 - 2
docs/sources/reference/builder.md

@@ -801,8 +801,8 @@ and for any `RUN`, `CMD` and `ENTRYPOINT` instructions that follow it in the
 
     WORKDIR /path/to/workdir
 
-The `WORKDIR` instruction sets the working directory for any `RUN`, `CMD` and
-`ENTRYPOINT` instructions that follow it in the `Dockerfile`.
+The `WORKDIR` instruction sets the working directory for any `RUN`, `CMD`,
+`ENTRYPOINT`, `COPY` and `ADD` instructions that follow it in the `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`