Skip to content

add usage examples for building Bake files from remote Git and HTTP sources, and Raw HTTPS #23196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all 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
22 changes: 16 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,25 @@ keywords: build, buildx, bake, file, remote, git, http

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

Using Git HTTPS

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

Using 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
```

Using HTTP/HTTPS

```console
docker buildx bake "https://raw.githubusercontent.com/docker/cli/v20.10.11/docker-bake.hcl" --print
```


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