Skip to content

Commit 94f29e7

Browse files
committed
Add the Docker Compose CLI plugin to the runner image
The base image ships the Docker CLI and Buildx but not Compose, so jobs that use `docker compose` (e.g. integration harnesses) currently have to download the plugin per run. Bake it in, pinned and checksum-verified, installed to the global CLI plugin path.
1 parent 8bde03e commit 94f29e7

2 files changed

Lines changed: 19 additions & 6 deletions

File tree

Dockerfile

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,26 @@
11
# Custom GitHub Actions self-hosted runner image for airplanes.live ARC.
22
# Official runner image + a C toolchain so cgo builds (e.g. `go test -race`)
3-
# work without a per-job apt-get. Docker-in-Docker for image builds is a
4-
# separate concern, handled by `containerMode: dind` in the ARC Helm values,
5-
# not by this image.
3+
# work without a per-job apt-get, plus the Docker Compose CLI plugin so
4+
# Compose-based jobs work without a per-job download. Docker-in-Docker for
5+
# image builds is a separate concern, handled by `containerMode: dind` in the
6+
# ARC Helm values, not by this image.
67
FROM ghcr.io/actions/actions-runner:2.334.0
78

9+
# Docker Compose CLI plugin, pinned + checksum-verified, installed to the global
10+
# CLI plugin path so `docker compose` resolves for the runner user. The base
11+
# image ships the Docker CLI + Buildx but not Compose. Build is linux/amd64 only.
12+
ARG COMPOSE_VERSION=v5.1.4
13+
ARG COMPOSE_SHA256=33b208d7e76639db742fae84b966cc01dacae58ca3fc4dabbc907045aefdf0c4
14+
815
USER root
916
RUN apt-get update \
1017
&& apt-get install -y --no-install-recommends \
11-
build-essential \
12-
&& rm -rf /var/lib/apt/lists/*
18+
build-essential ca-certificates curl \
19+
&& rm -rf /var/lib/apt/lists/* \
20+
&& mkdir -p /usr/local/lib/docker/cli-plugins \
21+
&& curl -fsSL -o /usr/local/lib/docker/cli-plugins/docker-compose \
22+
"https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-linux-x86_64" \
23+
&& echo "${COMPOSE_SHA256} /usr/local/lib/docker/cli-plugins/docker-compose" | sha256sum -c - \
24+
&& chmod 0755 /usr/local/lib/docker/cli-plugins/docker-compose \
25+
&& /usr/local/lib/docker/cli-plugins/docker-compose version
1326
USER runner

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Custom GitHub Actions self-hosted runner image for airplanes.live ARC.
44

5-
Thin layer on top of the official [`ghcr.io/actions/actions-runner`](https://github.com/actions/runner/pkgs/container/actions-runner) base, adding a C toolchain (`build-essential`) so cgo builds (`go test -race`) work without a per-job `apt-get`. The base image ships Docker CLI + Buildx; those are untouched.
5+
Thin layer on top of the official [`ghcr.io/actions/actions-runner`](https://github.com/actions/runner/pkgs/container/actions-runner) base, adding a C toolchain (`build-essential`) so cgo builds (`go test -race`) work without a per-job `apt-get`, plus the Docker Compose CLI plugin (pinned + checksum-verified) so Compose-based jobs work without a per-job download. The base image ships the Docker CLI + Buildx.
66

77
We don't use a community runner image (e.g. `catthehacker/ubuntu`) — single-maintainer supply-chain exposure. A pinned Dockerfile on GitHub's official base keeps us on a patched image we control.
88

0 commit comments

Comments
 (0)