File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1323,17 +1323,19 @@ ADD [--keep-git-dir=<boolean>] <git ref> <dir>
1323
1323
```
1324
1324
1325
1325
``` dockerfile
1326
- # syntax=docker/dockerfile-upstream:master -labs
1326
+ # syntax=docker/dockerfile:1 -labs
1327
1327
FROM alpine
1328
1328
ADD --keep-git-dir=true https://github.com/moby/buildkit.git#v0.10.1 /buildkit
1329
1329
```
1330
1330
1331
1331
The ` --keep-git-dir=true ` flag adds the ` .git ` directory. This flag defaults to false.
1332
1332
1333
1333
### Adding a private git repository
1334
+
1334
1335
To add a private repo via SSH, create a Dockerfile with the following form:
1336
+
1335
1337
``` dockerfile
1336
- # syntax = docker/dockerfile-upstream:master -labs
1338
+ # syntax= docker/dockerfile:1 -labs
1337
1339
FROM alpine
1338
1340
ADD [email protected] :foo/bar.git /bar
1339
1341
```
You can’t perform that action at this time.
0 commit comments