Skip to content
Closed
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 24 additions & 6 deletions content/manuals/build/bake/remote-definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,33 @@ keywords: build, buildx, bake, file, remote, git, http

You can build Bake files directly from a remote Git repository or HTTPS URL:

{{<tabs>}}

{{<tab name="Git HTTPS">}}

```console
docker buildx bake "https://github.com/docker/cli.git#v20.10.11" --print
```

{{</tab>}}

{{<tab name="Git SSH">}}

```console
$ docker buildx bake "https://github.com/docker/cli.git#v20.10.11" --print
#1 [internal] load git source https://github.com/docker/cli.git#v20.10.11
#1 0.745 e8f1871b077b64bcb4a13334b7146492773769f7 refs/tags/v20.10.11
#1 2.022 From https://github.com/docker/cli
#1 2.022 * [new tag] v20.10.11 -> v20.10.11
#1 DONE 2.9s
docker buildx bake "[email protected]:docker/cli.git#v20.10.11" --print
```

{{</tab>}}

{{<tab name="HTTP/HTTPS">}}

```console
docker buildx bake "https://raw.githubusercontent.com/docker/cli/v20.10.11/docker-bake.hcl" --print
```
{{</tab>}}

{{</tabs>}}

This fetches the Bake definition from the specified remote location and
executes the groups or targets defined in that file. If the remote Bake
definition doesn't specify a build context, the context is automatically set to
Expand Down