Skip to content

Commit 86698cb

Browse files
mgarrattclaude
andcommitted
feat(gha-runner): custom ARC runner image with build tools
The minimal actions/actions-runner image lacks tools our g5t-uk workflows need (make/build-essential for Makefile targets + Python C-extensions, libatomic1 for pnpm, the docker compose plugin for compose smoke tests), so lint/test jobs fail on the self-hosted runners. Add an arm64-only gha-runner image (FROM actions/actions-runner + those packages), built and published by the standard matrix (publish.yml) like every other image. arm64-only because the ARC runners are aarch64. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 5202f10 commit 86698cb

3 files changed

Lines changed: 60 additions & 0 deletions

File tree

images/gha-runner/Dockerfile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# syntax=docker/dockerfile:1
2+
# Custom GitHub Actions runner image for the g5t-uk ARC scale set.
3+
#
4+
# The upstream actions/actions-runner image is intentionally minimal and lacks
5+
# tools that ubuntu-latest ships and our workflows assume:
6+
# make + build-essential -> Makefile targets and Python C-extension builds
7+
# libatomic1 -> pnpm's prebuilt binary needs libatomic.so.1
8+
# docker compose plugin -> the `docker compose` subcommand (compose smoke tests)
9+
#
10+
# arm64-only: the cluster nodes (and therefore the runners) are aarch64.
11+
ARG RUNNER_VERSION=2.335.1
12+
FROM ghcr.io/actions/actions-runner:${RUNNER_VERSION}
13+
14+
ARG COMPOSE_VERSION=v2.32.4
15+
16+
USER root
17+
18+
# hadolint ignore=DL3008
19+
RUN apt-get update \
20+
&& apt-get install -y --no-install-recommends \
21+
build-essential \
22+
ca-certificates \
23+
curl \
24+
git \
25+
jq \
26+
libatomic1 \
27+
make \
28+
&& rm -rf /var/lib/apt/lists/*
29+
30+
# Docker Compose v2 as a CLI plugin (not packaged in the runner image). aarch64
31+
# binary into a standard cli-plugins search path so `docker compose` resolves.
32+
RUN mkdir -p /usr/local/lib/docker/cli-plugins \
33+
&& curl -fsSL "https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-linux-aarch64" \
34+
-o /usr/local/lib/docker/cli-plugins/docker-compose \
35+
&& chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
36+
37+
USER runner

images/gha-runner/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# gha-runner
2+
3+
Custom GitHub Actions runner image for the **g5t-uk ARC scale set** — the
4+
upstream `actions/actions-runner` plus the tools `ubuntu-latest` ships that the
5+
minimal image doesn't, so self-hosted lint/test jobs work:
6+
7+
- `make` + `build-essential` — Makefile targets and Python C-extension builds
8+
- `libatomic1` — pnpm's prebuilt binary needs `libatomic.so.1`
9+
- the `docker compose` CLI plugin — compose-based smoke tests
10+
11+
`arm64`-only (the runners are aarch64). Built and published by the standard
12+
matrix (`publish.yml`) like every other image, to
13+
`ghcr.io/mgarratt/docker-images/gha-runner`.
14+
15+
The published package must be **public** so the ARC scale set can pull it without
16+
a secret; the `arc-runner-set` HelmRelease in the home cluster points its runner
17+
`image:` here.

images/gha-runner/image.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
image = "gha-runner"
2+
# arm64-only: the ARC scale-set runners are aarch64, so there is no amd64 runner
3+
# to schedule an amd64 variant on. The matrix passes these per-image platforms to
4+
# buildx.
5+
platforms = ["linux/arm64"]
6+
build_args = { RUNNER_VERSION = "2.335.1", COMPOSE_VERSION = "v2.32.4" }

0 commit comments

Comments
 (0)