Skip to content

Commit

Permalink
Merge pull request #5259 from dvdksn/s_add_copy
Browse files Browse the repository at this point in the history
docs: fix instruction name (s/ADD/COPY/)
  • Loading branch information
tonistiigi committed Aug 16, 2024
2 parents b04830b + 7f80dbd commit 24d04a7
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 @@ -1549,19 +1549,19 @@ relative to the root of the current build stage.

```dockerfile
# create /abs/test.txt
ADD test.txt /abs/
COPY test.txt /abs/
```

Trailing slashes are significant. For example, `ADD test.txt /abs` creates a
file at `/abs`, whereas `ADD test.txt /abs/` creates `/abs/test.txt`.
Trailing slashes are significant. For example, `COPY test.txt /abs` creates a
file at `/abs`, whereas `COPY test.txt /abs/` creates `/abs/test.txt`.

If the destination path doesn't begin with a leading slash, it's interpreted as
relative to the working directory of the build container.

```dockerfile
WORKDIR /usr/src/app
# create /usr/src/app/rel/test.txt
ADD test.txt rel/
COPY test.txt rel/
```

If destination doesn't exist, it's created, along with all missing directories
Expand Down

0 comments on commit 24d04a7

Please sign in to comment.