Blacksmith optionally caches your Docker layers to speed up your workflows
docker/build-push-action
action in your GitHub Actions workflow file, and your Docker builds will be able to reuse cached docker layers from previous runs, and only rebuild the layers that have changed.
Our customers have reported 2x to 40x improvements in build times due to this single change.
docker/build-push-action
in your workflow, but are instead calling Docker commands directly or are using the docker/bake-action
, you can still cache your Docker layers by setting up a Blacksmith buildx builder before interacting with Docker.
This builder will be hydrated with the layer cache from previous runs and will commit the updated layer cache at the end of the job.
setup-only: true
, but not running the Docker build and push via the build-push-action
will prevent Docker analytics from being recorded and surfaced in the Blacksmith dashboard for those builds.useblacksmith/build-push-action
, a hydrated layer cache from previous runs will be mounted into the runner.
The Docker build triggered by the build-push-action will subsequently be able to use the cached layers, instead of rebuilding everything from scratch.
At the end of the job, the runner will commit its changes to the layer cache for future runs.
The Docker layer cache is shared by all runners in a repository, in your organization.
In case of several concurrent Docker builds, it may take a few runs until all the builds have their layers committed to the cache.
This is in keeping with the Last Write Wins (LWW) policy we enforce in the face of concurrent committers.
blacksmith-8vcpu-ubuntu-2204
and the arm64 build runs on blacksmith-8vcpu-ubuntu-2204-arm
. Each image is pushed with its own tag that includes the architecture.
For ARM builds, this avoids needing to use QEMU to emulate ARM on an amd64 runner, which can be extremely slow.
useblacksmith/build-push-action
action will support multi-platform builds natively. You’ll simply need to specify the platforms you want to build for in the platforms
input, and Blacksmith will automatically spawn native builders for each platform, eliminating the need for the matrix strategy shown above.
blacksmith-8vcpu-ubuntu-2204
and the arm64 build on a blacksmith-8vcpu-ubuntu-2204-arm
runner) and automatically merged into a single multi-arch manifest.
buildkitd
) that powers Docker builds, runs exclusively on a local Unix socket and is not exposed to the public internet.
The Docker layer cache for each repository is stored in a secure Ceph cluster. Every runner gets an ephemeral authentication token that allows it to request and commit artifacts.
The runners do not have persistent credentials to the Ceph cluster or direct access to artifacts in the cluster. The Ceph cluster is configured with object-level access controls.
Usage & Billing
page to get a breakdown of their current usage.