Skip to content

Commit

Permalink
docs: update syntax for labs channel in examples
Browse files Browse the repository at this point in the history
The dockerfile:1-labs frontend is now updated to 1.5-labs, which
includes this feature

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit faf4760)
  • Loading branch information
thaJeztah authored and tonistiigi committed Feb 13, 2023
1 parent 522d28e commit e164cae
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/dockerfile/docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1323,17 +1323,19 @@ ADD [--keep-git-dir=<boolean>] <git ref> <dir>
```

```dockerfile
# syntax=docker/dockerfile-upstream:master-labs
# syntax=docker/dockerfile:1-labs
FROM alpine
ADD --keep-git-dir=true https://github.com/moby/buildkit.git#v0.10.1 /buildkit
```

The `--keep-git-dir=true` flag adds the `.git` directory. This flag defaults to false.

### Adding a private git repository

To add a private repo via SSH, create a Dockerfile with the following form:

```dockerfile
# syntax = docker/dockerfile-upstream:master-labs
# syntax=docker/dockerfile:1-labs
FROM alpine
ADD [email protected]:foo/bar.git /bar
```
Expand Down

0 comments on commit e164cae

Please sign in to comment.