flagon-io/g1t

public

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

g1t/deploy/runner/Dockerfile

31 lines1,309 bytesCodeBlame
1# syntax=docker/dockerfile:1.7
2#
3# The self-hosted runner's image: `g1t-runner`, the Docker CLI (to start
4# each job in a sibling container through the host's Docker socket), and
5# what a job needs to run in this container itself with --no-docker
6# (git, bash, Node), for Kubernetes pods that take one job each.
7#
8# docker run -d --restart unless-stopped \
9# -v /var/run/docker.sock:/var/run/docker.sock -v g1t-runner:/data \
10# -e G1T_RUNNER_URL=https://g1t.sh -e G1T_RUNNER_TOKEN=g1trt_… \
11# flagonio/g1t-runner
12#
13# Build context: a folder holding `g1t-runner` for the image's platform,
14# the static Linux build that scripts/runner-release.mjs makes (or
15# scripts/build-runner.mjs, for x64). The release workflow builds and
16# pushes it for linux/amd64 and linux/arm64.
17
18FROM docker:28-cli AS docker
19
20FROM node:24-bookworm-slim
21RUN apt-get update \
22 && apt-get install -y --no-install-recommends git ca-certificates curl \
23 && rm -rf /var/lib/apt/lists/* \
24 && mkdir -p /data /home/runner && chown -R node:node /data /home/runner
25COPY --from=docker /usr/local/bin/docker /usr/local/bin/docker
26COPY --chmod=0755 g1t-runner /usr/local/bin/g1t-runner
27# Its configuration and credential live on this volume.
28ENV G1T_RUNNER_DIR=/data
29VOLUME /data
30ENTRYPOINT ["g1t-runner"]
31CMD ["register-and-run"]