docker/setup-buildx-action
Set up Docker Buildx so a workflow can do multi-platform builds and layer caching.
What it does
docker/setup-buildx-action installs and starts a Buildx builder using the docker-container driver, which is what enables multi-platform builds and the type=gha cache backend.
It is the step you add right before docker/build-push-action.
Usage
steps:
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v6
with:
tags: myorg/app:ciInputs
| Input | Description | Default | Required |
|---|---|---|---|
driver | Buildx driver to use. | docker-container | No |
driver-opts | Options passed to the driver. | - | No |
platforms | Fixed platforms for the builder. | - | No |
install | Set Buildx as the default docker builder. | false | No |
Outputs
| Output | Description |
|---|---|
name | Name of the builder instance. |
platforms | Platforms the builder supports. |
Notes
The default docker-container driver is what makes cache-to: type=gha work; the default docker driver does not support it.
Common errors
Cache export is not supported for the docker drivermeans Buildx is using the plain docker driver. setup-buildx-action selects docker-container, which supports it.
Security and pinning
- Pin to a commit SHA.