Custom images
An organization can build its own runner image from a folder in this repository.
Configure
Create a folder with a
Dockerfile, for exampleorgs/acme/Dockerfile:dockerfileFROM runner-image RUN apt-get update -y && apt-get install -y --no-install-recommends terraform \ && rm -rf /var/lib/apt/lists/*Point the organization at it in
orgs.conf:AcmeTools context=orgs/acmeBuild it:
bash./fleet.sh build AcmeTools
The image is tagged runner-image-acmetools and used by that organization's runner. Other organizations keep the default runner-image.
The base image contract
Start
FROM runner-imageand add layers. That keeps the entrypoint, the inner Docker engine, and the runner user intact.A self-contained Dockerfile is possible, but it must provide the same contract: the root
/entrypoint.sh(startdockerd, then run/start.shas thedockeruser), an/home/docker/actions-runner, andstart.shin place.To support
deploy_ssh=andcheck-ssh, the image must also run the entrypoint deploy SSH staging (copy/run/deploy-sshinto the runner user's~/.ssh/deploy.d/and prependInclude ~/.ssh/deploy.d/configto~/.ssh/config) and shipdeploy-ssh-checkas/usr/local/bin/deploy-ssh-check. InheritingFROM runner-imageprovides both — see Deploy over SSH.update-runnersbuilds the default image first, then every custom context with--build-arg RUNNER_VERSION=<version>. Consume that argument if you replace the base:dockerfileARG RUNNER_VERSION
Staging
Custom builds never see your credentials until the build starts:
- The context is copied to a gitignored
.fleet-build/<slug>/directory. ~/.sshand the host credential files are copied there with restricted modes.- The directory is removed afterwards, whether the build succeeds or fails.
Do not put secrets in the context folder — they are refused for staging and would be committed otherwise.