Skip to content

Commit

Permalink
Add/fix references to labs dockerfile version
Browse files Browse the repository at this point in the history
COPY options `--parents` and `--exclude` require dockerfile version `1.7-labs`.
Existing table of options only lists required version as `1.7`.
Code examples for `--exclude` does not include syntax line, like is included in
the code examples for `--parents`.

Signed-off-by: Eoin Farrell <me@eoinfarrell.dev>
  • Loading branch information
EoinFarrell committed Oct 23, 2024
1 parent 17896f6 commit 3eb4892
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions frontend/dockerfile/docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1522,8 +1522,8 @@ The available `[OPTIONS]` are:
| [`--chown`](#copy---chown---chmod) | |
| [`--chmod`](#copy---chown---chmod) | 1.2 |
| [`--link`](#copy---link) | 1.4 |
| [`--parents`](#copy---parents) | 1.7 |
| [`--exclude`](#copy---exclude) | 1.7 |
| [`--parents`](#copy---parents) | 1.7-labs |
| [`--exclude`](#copy---exclude) | 1.7-labs |

The `COPY` instruction copies new files or directories from `<src>` and adds
them to the filesystem of the image at the path `<dest>`. Files and directories
Expand Down Expand Up @@ -1882,6 +1882,9 @@ supporting wildcards and matching using Go's
For example, to add all files starting with "hom", excluding files with a `.txt` extension:

```dockerfile
# syntax=docker/dockerfile:1.7-labs
FROM scratch

COPY --exclude=*.txt hom* /mydir/
```

Expand All @@ -1891,6 +1894,9 @@ even if the files paths match the pattern specified in `<src>`.
To add all files starting with "hom", excluding files with either `.txt` or `.md` extensions:

```dockerfile
# syntax=docker/dockerfile:1.7-labs
FROM scratch

COPY --exclude=*.txt --exclude=*.md hom* /mydir/
```

Expand Down

0 comments on commit 3eb4892

Please sign in to comment.