Skip to content

Commit

Permalink
docs: clarify that leading parent dir paths are stripped away
Browse files Browse the repository at this point in the history
Signed-off-by: David Karlsson <[email protected]>
  • Loading branch information
dvdksn committed Mar 28, 2024
1 parent 639f6a2 commit 7408bfc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/dockerfile/docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1429,10 +1429,10 @@ attempted to be used instead.

`COPY` obeys the following rules:

- The `<src>` path must be inside the build context;
you can't use `COPY ../something /something`, because the builder can only
access files from the context, and `../something` specifies a parent file or
directory of the build context root.
- The `<src>` path is resolved relative to the build context.
If you specify a relative path leading outside of the build context, such as
`COPY ../something /something`, parent directory paths are stripped out automatically.
The effective source path in this example becomes `COPY something /something`

- If `<src>` is a directory, the entire contents of the directory are copied,
including filesystem metadata.
Expand Down

0 comments on commit 7408bfc

Please sign in to comment.