Files
canopy-workloads/github_runner/Dockerfile
T
kiskaadee 51445d4af1 feat(github_runner): author Nix-enabled ephemeral GitHub Actions runner stack (#11)
- .gitignore: ignore **/.env and **/app.env so runtime workload env files do not fail appctl clean-tree checks

- github_runner/Dockerfile & entrypoint-nix.sh: extend pinned myoung34/github-runner:ubuntu-noble with nixos/nix:2.24.12 seed, /etc/nix/nix.conf, non-root runner ownership, and single-line APP_PRIVATE_KEY_B64 decoding

- github_runner/docker-compose.yml: configure EPHEMERAL=true, RUN_AS_ROOT=false, DISABLE_AUTO_UPDATE=true, RUNNER_WORKDIR=/data/work, ../../var/lib/homelab/github_runner:/data, nix-store:/nix, and omit proxy-net for network isolation

- github_runner/app.yaml, .env-example, README.md & deployments.yaml: register github_runner (alias gh-runner) in admission registry and document GitHub App org permissions
2026-11-23 16:36:12 -05:00

24 lines
982 B
Docker

FROM nixos/nix:2.24.12 AS nix-src
RUN tar -czf /nix-seed.tar.gz -C /nix .
FROM myoung34/github-runner:ubuntu-noble@sha256:4c5ebb26d973b16e55250de938a498afb2f7714ef391709f3abb9d8b666b8515
# Regular file (never a symlink into /nix/store) so nix-store volume mounts cannot break it
RUN mkdir -p /etc/nix /nix && \
printf '%s\n' \
'sandbox = false' \
'experimental-features = nix-command flakes' \
'trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=' \
> /etc/nix/nix.conf
COPY --from=nix-src /nix /nix
COPY --from=nix-src /nix-seed.tar.gz /opt/nix-seed.tar.gz
COPY entrypoint-nix.sh /usr/local/bin/entrypoint-nix.sh
RUN chmod +x /usr/local/bin/entrypoint-nix.sh && \
chown -R runner:runner /nix
ENV PATH="/usr/local/bin:/nix/var/nix/profiles/default/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin"
ENTRYPOINT ["/usr/local/bin/entrypoint-nix.sh"]
CMD ["./bin/Runner.Listener", "run", "--startuptype", "service"]