Skip to content

Commit 3eb4892

Browse files
committed
Add/fix references to labs dockerfile version
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 <[email protected]>
1 parent 17896f6 commit 3eb4892

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

frontend/dockerfile/docs/reference.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,8 +1522,8 @@ The available `[OPTIONS]` are:
15221522
| [`--chown`](#copy---chown---chmod) | |
15231523
| [`--chmod`](#copy---chown---chmod) | 1.2 |
15241524
| [`--link`](#copy---link) | 1.4 |
1525-
| [`--parents`](#copy---parents) | 1.7 |
1526-
| [`--exclude`](#copy---exclude) | 1.7 |
1525+
| [`--parents`](#copy---parents) | 1.7-labs |
1526+
| [`--exclude`](#copy---exclude) | 1.7-labs |
15271527

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

18841884
```dockerfile
1885+
# syntax=docker/dockerfile:1.7-labs
1886+
FROM scratch
1887+
18851888
COPY --exclude=*.txt hom* /mydir/
18861889
```
18871890

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

18931896
```dockerfile
1897+
# syntax=docker/dockerfile:1.7-labs
1898+
FROM scratch
1899+
18941900
COPY --exclude=*.txt --exclude=*.md hom* /mydir/
18951901
```
18961902

0 commit comments

Comments
 (0)