BuildPulse Docker Build Cache
Docker builder runners keep a persistent Docker layer cache for your organization. A build reuses the layers from earlier builds and only rebuilds what changed.
- Skip rebuilding image layers that have not changed
- Keep
RUN --mount=type=cachedirectories between builds - No
cache-fromorcache-toconfiguration, and no cache export or import step in the job
Usage
Run the job on a Docker builder runner and use buildpulse/setup-docker-builder in place of docker/setup-buildx-action:
jobs:
build:
- runs-on: ubuntu-latest
+ runs-on: bp-docker-builder-x64-8x
steps:
- uses: actions/checkout@v4
- - uses: docker/setup-buildx-action@v3
+ - uses: buildpulse/setup-docker-builder@v2
- uses: docker/build-push-action@v6
with:
tags: org/app:latest
The action takes no inputs. See Docker Builders for setup and sizes.
How Docker Build Cache Works
Docker images are composed of layers, each generated by a Dockerfile instruction. A build reuses any layer whose inputs have not changed and rebuilds the rest.
On a Docker builder, the cache is the build daemon's own state rather than an exported archive. buildpulse/setup-docker-builder points buildx at the builder that is already running on the runner. After a successful job, the cache is saved for your organization and is there for the next build.
Storage
The Docker build cache counts toward your organization's cache storage, together with the Artifact Cache. 250 GB is included, and storage past that is $0.20 per GB a month. The Runners, Cache tab in BuildPulse shows the current size. Docker layer cache that has not been used for 7 days is removed.
buildpulse/setup-buildx-action and buildpulse/build-push-action are deprecated and do not work on current BuildPulse runners.