Skip to content
Merged
Show file tree
Hide file tree
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
26 changes: 25 additions & 1 deletion content/manuals/build-cloud/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@
with:
driver: cloud
endpoint: "${{ vars.DOCKER_ACCOUNT }}/${{ vars.CLOUD_BUILDER_NAME }}" # for example, "acme/default"
install: true

- name: Build and push
uses: docker/build-push-action@v6
Expand All @@ -111,6 +110,31 @@
outputs: ${{ github.event_name == 'pull_request' && 'type=cacheonly' || 'type=registry' }}
```

The example above uses `docker/build-push-action`, which automatically uses the

Check warning on line 113 in content/manuals/build-cloud/ci.md

View workflow job for this annotation

GitHub Actions / validate (vale)

[vale] reported by reviewdog 🐶 [Docker.RecommendedWords] Consider using 'previous' instead of 'above' Raw Output: {"message": "[Docker.RecommendedWords] Consider using 'previous' instead of 'above'", "location": {"path": "content/manuals/build-cloud/ci.md", "range": {"start": {"line": 113, "column": 13}}}, "severity": "INFO"}
builder set up by `setup-buildx-action`. If you need to use the `docker build`
command directly instead, you have two options:

- Use `docker buildx build` instead of `docker build`
- Set the `BUILDX_BUILDER` environment variable to use the cloud builder:

```yaml
- name: Set up Docker Buildx
id: builder
uses: docker/setup-buildx-action@v3
with:
driver: cloud
endpoint: "${{ vars.DOCKER_ACCOUNT }}/${{ vars.CLOUD_BUILDER_NAME }}"

- name: Build
run: |
docker build .
env:
BUILDX_BUILDER: ${{ steps.builder.outputs.name }}
```

For more information about the `BUILDX_BUILDER` environment variable, see
[Build variables](/manuals/build/building/variables.md#buildx_builder).

### GitLab

```yaml
Expand Down
10 changes: 5 additions & 5 deletions content/manuals/build-cloud/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
builder for the `docker buildx build` command. The `docker build` command still
uses the `default` builder, unless you specify the `--builder` flag explicitly.

If you use build scripts, such as `make`, we recommend that you update your
build commands from `docker build` to `docker buildx build`, to avoid any
confusion with regards to builder selection. Alternatively, you can run `docker
buildx install` to make the default `docker build` command behave like `docker
buildx build`, without discrepancies.
If you use build scripts, such as `make`, that use the `docker build` command,
we recommend updating your build commands to `docker buildx build`. Alternatively,

Check warning on line 49 in content/manuals/build-cloud/usage.md

View workflow job for this annotation

GitHub Actions / validate (vale)

[vale] reported by reviewdog 🐶 [Docker.We] Avoid using first-person plural like 'we'. Raw Output: {"message": "[Docker.We] Avoid using first-person plural like 'we'.", "location": {"path": "content/manuals/build-cloud/usage.md", "range": {"start": {"line": 49, "column": 1}}}, "severity": "WARNING"}
you can set the [`BUILDX_BUILDER` environment
variable](/manuals/build/building/variables.md#buildx_builder) to specify which
builder `docker build` should use.

## Use with Docker Compose

Expand Down
Loading