The docs around COPY/ADD already mentioned that it will do a relative
copy/add based on WORKDIR, so that part is already ok. Just needed to
tweak the WORKDIR section since w/o mentioning COPY/ADD it can be misleading.
Noticed by @phemmer
Signed-off-by: Doug Davis <dug@us.ibm.com>
| ... | ... |
@@ -195,7 +195,7 @@ or |
| 195 | 195 |
|
| 196 | 196 |
**WORKDIR** |
| 197 | 197 |
-- **WORKDIR /path/to/workdir** |
| 198 |
- The WORKDIR instruction sets the working directory for the **RUN**, **CMD**, and **ENTRYPOINT** Dockerfile commands that follow it. |
|
| 198 |
+ The WORKDIR instruction sets the working directory for the **RUN**, **CMD**, **ENTRYPOINT**, **COPY** and **ADD** Dockerfile commands that follow it. |
|
| 199 | 199 |
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: |
| 200 | 200 |
**WORKDIR /a WORKDIR b WORKDIR c RUN pwd** |
| 201 | 201 |
In the above example, the output of the **pwd** command is **a/b/c**. |
| ... | ... |
@@ -801,8 +801,8 @@ and for any `RUN`, `CMD` and `ENTRYPOINT` instructions that follow it in the |
| 801 | 801 |
|
| 802 | 802 |
WORKDIR /path/to/workdir |
| 803 | 803 |
|
| 804 |
-The `WORKDIR` instruction sets the working directory for any `RUN`, `CMD` and |
|
| 805 |
-`ENTRYPOINT` instructions that follow it in the `Dockerfile`. |
|
| 804 |
+The `WORKDIR` instruction sets the working directory for any `RUN`, `CMD`, |
|
| 805 |
+`ENTRYPOINT`, `COPY` and `ADD` instructions that follow it in the `Dockerfile`. |
|
| 806 | 806 |
|
| 807 | 807 |
It can be used multiple times in the one `Dockerfile`. If a relative path |
| 808 | 808 |
is provided, it will be relative to the path of the previous `WORKDIR` |