File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
content/manuals/build/concepts Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -245,6 +245,34 @@ docker build github.com/docker/buildx#d4f088e689b41353d74f1a0bfcd6d7c0b213aed2
245
245
docker build github.com/docker/buildx#d4f088e
246
246
```
247
247
248
+ ### URL queries
249
+
250
+ Starting with Buildx v0.28 and BuildKit v0.24, URL queries are also supported.
251
+ URL queries are more structured and recommended over [ URL fragments] ( #url-fragments ) .
252
+
253
+ For example,
254
+ ``` console
255
+ $ docker buildx build ' https://github.com/user/myrepo.git?branch=container&subdir=docker'
256
+ ```
257
+
258
+ | Build Syntax Suffix | Commit Used | Build Context Used |
259
+ | -------------------------------------------- | ----------------------------- | ------------------ |
260
+ | ` myrepo.git ` | ` refs/heads/<default branch> ` | ` / ` |
261
+ | ` myrepo.git?tag=mytag ` | ` refs/tags/mytag ` | ` / ` |
262
+ | ` myrepo.git?branch=mybranch ` | ` refs/heads/mybranch ` | ` / ` |
263
+ | ` myrepo.git?ref=pull/42/head ` | ` refs/pull/42/head ` | ` / ` |
264
+ | ` myrepo.git?subdir=myfolder ` | ` refs/heads/<default branch> ` | ` /myfolder ` |
265
+ | ` myrepo.git?branch=master&subdir=myfolder ` | ` refs/heads/master ` | ` /myfolder ` |
266
+ | ` myrepo.git?tag=mytag&subdir=myfolder ` | ` refs/tags/mytag ` | ` /myfolder ` |
267
+ | ` myrepo.git?branch=mybranch&subdir=myfolder ` | ` refs/heads/mybranch ` | ` /myfolder ` |
268
+
269
+ A commit hash can be specified as a ` commit ` or ` checksum ` query, along with ` tag ` , ` branch ` , or ` ref ` .
270
+ A hash does not need to be a full hash.
271
+
272
+ ``` bash
273
+ docker buildx build ' https://github.com/moby/buildkit.git?tag=v0.21.1&checksum=66735c67'
274
+ ```
275
+
248
276
#### Keep ` .git ` directory
249
277
250
278
By default, BuildKit doesn't keep the ` .git ` directory when using Git contexts.
You can’t perform that action at this time.
0 commit comments