From f709da192cda47c9aaaa212b03442d4f28afdb97 Mon Sep 17 00:00:00 2001 From: Doug Davis Date: Mon, 26 Jan 2015 05:29:49 -0800 Subject: [PATCH] Fix docs so WORKDIR mentions it works for COPY and ADD too 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 --- docs/man/Dockerfile.5.md | 2 +- docs/sources/reference/builder.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/man/Dockerfile.5.md b/docs/man/Dockerfile.5.md index 787142d29a..20fbf8ac31 100644 --- a/docs/man/Dockerfile.5.md +++ b/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**. diff --git a/docs/sources/reference/builder.md b/docs/sources/reference/builder.md index 43e88c766d..3931bb28a5 100644 --- a/docs/sources/reference/builder.md +++ b/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`