docker/setup-buildx-action: Buildx setup for GitHub Actions
GitHub Action to set up Docker Buildx
At a glance
- What is it?
- docker/setup-buildx-action creates and starts a Docker Buildx builder inside a GitHub Actions job. It is intended for workflows that need multi-platform builds, BuildKit cache export, custom BuildKit configuration, or remote and additional builder nodes.
- Who is it for?
- Adopt this action for GitHub Actions jobs that need Buildx before a build step, especially multi-platform or configurable BuildKit builds. Do not add it to pipelines that only need an already available Docker daemon.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository received new commits within the last day.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.
Editorial analysis
Why docker/setup-buildx-action exists in a GitHub job
docker/setup-buildx-action addresses a sequencing problem in GitHub Actions. A workflow cannot simply assume that the Buildx builder configuration it needs is present and started before a later build step runs. This action creates a builder and boots it so subsequent steps can use Buildx directly or invoke the related build-push action.
Its default reason for existing is more specific than ordinary Docker image building. The `docker-container` driver places BuildKit in a container, allowing the builder to support multi-platform images and cache export through BuildKit. The README also describes QEMU as optional preparation for more platforms. That means the action addresses platform emulation and builder isolation, not application deployment, image scanning, or registry publishing.
The intended users are maintainers of GitHub Actions workflows that already use Docker or Buildx and need a reproducible builder setup step. The action is less suitable for a job that only runs ordinary Docker commands against the runner's existing daemon. Its inputs also support teams that need a specific Buildx version, a fixed builder name, driver-specific options, BuildKit daemon flags, extra nodes, or remote builders authenticated over SSH or TLS. Those are workflow engineering concerns, and setup-buildx-action keeps them in a dedicated step before compilation begins.
How docker/setup-buildx-action prepares the Buildx builder
The documented flow has three parts. The action creates a builder, boots that builder, and leaves it available to following workflow steps. A fixed `name` can cause an existing builder of that name to be reused instead of creating another one. Otherwise, the action generates a name when one is not supplied. The `use` input defaults to `true`, which switches subsequent Buildx usage to the prepared instance.
The driver defaults to `docker-container`. Driver-specific settings can be supplied through newline-delimited `driver-opts`, including a BuildKit image selection and network mode. Other inputs pass BuildKit daemon configuration through `buildkitd-config`, `buildkitd-config-inline`, or `buildkitd-flags`. Platforms can be given as a comma-delimited list, while additional builder nodes and remote endpoints are documented configuration paths.
Based on the repository layout, the distributable action is stored under `dist/`, while its TypeScript entry point is `src/main.ts`. The package build command bundles that entry point as CommonJS for Node.js 24 and generates a license file. This distinction matters when adopting the action: workflow users normally reference the published GitHub Action, while contributors work with TypeScript, `action.yml`, tests, and the bundled artifact. The README does not expose the internal implementation functions, so it does not justify claims about their individual sequence beyond the documented create, boot, and reuse behavior.
Adding the first builder to a workflow
No package installation is required for a workflow consumer. The README points users to the GitHub Marketplace listing and demonstrates using the action as a workflow step. This first example prepares QEMU and then sets up Buildx on `ubuntu-latest`. It does not build an image by itself, so a successful job needs a later build step that consumes the prepared builder.
name: ci
on:
push:
jobs:
buildx:
runs-on: ubuntu-latest
steps:
-
# Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
name: Set up QEMU
uses: docker/setup-qemu-action@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4The first block is the README's baseline example. It selects a major action version, not one of the listed patch releases, and prepares optional emulation before Buildx. Maintainers who need reproducible behavior should check the project's version-pinning documentation before deciding whether the major tag meets their policy.
For maintainers working from a checkout, `package.json` declares Yarn 4.15.0. It provides a test script and a build script that refreshes the bundled action code and `dist/licenses.txt`. The build command is long enough that it is better treated as a release-maintenance operation than as a separate setup step for every workflow run.
Pinning driver options and BuildKit image selection
The clearest customization example uses `driver-opts`. Its value is a newline-delimited string, not YAML sequence syntax. The following block is copied from the documented input format. It selects `moby/buildkit:master` and uses the host network for the BuildKit container.
driver-opts: |
image=moby/buildkit:master
network=hostThis example is useful for understanding the input model, but `master` is a moving reference. The README separately links to version pinning for Buildx and BuildKit, so production workflows should first determine whether they intend to track that tag or select a fixed release. The README does not prescribe one policy.
A platform list uses a different delimiter. This block follows the documented CSV form:
platforms: linux/amd64,linux/arm64Selecting platforms does not, by itself, guarantee that an environment can execute every architecture. The baseline workflow points to `docker/setup-qemu-action@v4` for optional emulation. For native or remote execution, the README documents additional nodes and remote-builder authentication, but it does not define all subsequent build behavior. Teams should therefore treat the Buildx builder setup and the availability of execution nodes as separate checks.
The action also accepts a `version` input for Buildx, including values such as `v0.3.0` or `latest`, and an optional `endpoint` for a Docker socket address or context. Those controls matter when a runner already has a compatible builder, but the README does not document a rollback procedure for changing versions after setup.
Configuration trade-offs and failure boundaries
The default `docker-container` driver is a deliberate boundary rather than a universal default. It enables multi-platform operation and BuildKit cache export, but it also means builds depend on a BuildKit container image and suitable Docker access. The documented `driver-opts` example shows that the image and container network are configurable. A network, storage, registry mirror, or daemon setting that is unavailable on the runner can prevent the builder from starting, even when the YAML itself is valid.
Remote builders add another dependency. The README documents authentication through SSH and TLS, which means secrets, endpoint reachability, certificates or keys, and the remote builder configuration all fall outside the local action step. The README does not describe error handling for expired credentials, inaccessible endpoints, or mismatched TLS settings.
BuildKit daemon configuration offers several independent surfaces: `buildkitd-flags`, a configuration file, inline configuration, registry mirrors, and maximum parallelism. Combining these without understanding BuildKit's own semantics can create duplicate or conflicting directives. The action's role is to pass configuration into builder creation; the README does not claim to validate whether a daemon policy is appropriate for a particular image.
The `use` input can also be set to `false`. That is meaningful for workflows preparing multiple builders or separating setup from selection, but later steps must then address the desired builder themselves. Documentation for the `nodes` output exists, but the input table in the README does not state its exact contract, so consumers should consult the complete output reference before scripting around it.
Maintenance, upgrades, and the Buildx CLI alternative
The repository is not archived, and the last push was on 2026-10-14. Recent releases include v4.4.1 on 2026-09-16, v4.4.0 on 2026-09-15, and v4.3.0 on 2026-08-19. This indicates recent project activity, but workflow upgrades still require attention because action behavior can pass through to Docker Buildx and BuildKit versions.
The repository uses Apache-2.0. Workflow consumers should account for that license when redistributing modified action code or distributing derived artifacts. The package build also runs `generate-license-file` and writes `dist/licenses.txt`, which shows that bundled dependency licensing is part of the distribution process. This is a compliance consideration rather than legal advice.
The real alternative is managing Docker Buildx directly in the job. setup-buildx-action packages those concerns as a reusable GitHub Action and offers declarative inputs such as `driver`, `version`, `driver-opts`, `buildkitd-config-inline`, `endpoint`, and `platforms`.
For repository contributors, the declared toolchain is Yarn 4.15.0, with Vitest for `yarn test`, ESLint for `yarn lint`, and an esbuild-based `yarn build`. Workflow teams normally incur no local package installation, while maintainers of a fork or custom action copy deal with JavaScript dependency updates, bundle regeneration, test execution, and review of changes in `dist/`.
Editorial conclusion
Adopt this action for GitHub Actions jobs that need Buildx before a build step, especially multi-platform or configurable BuildKit builds. Do not add it to pipelines that only need an already available Docker daemon. Verify driver and image availability, required platforms, daemon configuration, remote authentication, and whether committing to Apache-2.0 fits the workflow's licensing requirements first.
Frequently asked questions
What does docker/setup-buildx-action do in a GitHub Actions workflow?
It creates and boots a Docker Buildx builder for use by later workflow steps. Its default `docker-container` driver supports multi-platform images and BuildKit cache export.
Do I need to install Buildx separately before using docker/setup-buildx-action?
The README shows direct workflow use with `uses: docker/setup-buildx-action@v4`, so no separate package-installation step is documented for workflow consumers. Contributor-level JavaScript tooling is a separate concern handled by the repository's `package.json`.
How do I configure the BuildKit image used by docker/setup-buildx-action?
Pass a newline-delimited `driver-opts` value. The documented example uses `image=moby/buildkit:master` together with `network=host`.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/docker-setup-buildx-action)Was this useful?