Skip to content

Commit

Permalink
Merge pull request #5447 from EoinFarrell/eoinfarrell/udpate-dockerfi…
Browse files Browse the repository at this point in the history
…le-reference

Add/fix references to labs dockerfile version
  • Loading branch information
tonistiigi authored Oct 23, 2024
2 parents ff0cedd + 62b7206 commit 3c06cec
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions frontend/dockerfile/docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,7 @@ The available `[OPTIONS]` are:
| [`--chown`](#add---chown---chmod) | |
| [`--chmod`](#add---chown---chmod) | 1.2 |
| [`--link`](#add---link) | 1.4 |
| [`--exclude`](#add---exclude) | 1.7 |
| [`--exclude`](#add---exclude) | 1.7-labs |

The `ADD` 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 @@ -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 @@ -1820,7 +1820,7 @@ COPY [--parents[=<boolean>]] <src> ... <dest>
The `--parents` flag preserves parent directories for `src` entries. This flag defaults to `false`.

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

COPY ./x/a.txt ./y/a.txt /no_parents/
Expand All @@ -1840,7 +1840,7 @@ directories after it will be preserved. This may be especially useful copies bet
with `--from` where the source paths need to be absolute.

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

COPY --parents ./x/./y/*.txt /parents/
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-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-labs
FROM scratch

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

Expand Down

0 comments on commit 3c06cec

Please sign in to comment.