Files
zeekayandHanzo Dev d697e8de8d Git Runner — GitHub-Actions-compatible CI runner for the Hanzo Git server
Native runner: module github.com/hanzo-git/runner, wire proto
github.com/hanzo-git/actions-proto-go, command git-runner, GIT_* env, git expr
context, git_* task-context keys, ghcr.io/hanzoai/runner-ubuntu job images.
Derived work — upstream attribution + MIT terms in NOTICE/LICENSE.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-13 11:46:09 -07:00

81 lines
1.7 KiB
Docker

### BUILDER STAGE
#
#
FROM golang:1.26-alpine3.23 AS builder
# Do not remove `git` here, it is required for getting runner version when executing `make build`
RUN apk add --no-cache make git
ARG GOPROXY
ENV GOPROXY=${GOPROXY:-}
COPY . /opt/src/runner
WORKDIR /opt/src/runner
RUN make clean && make build
### DIND VARIANT
#
#
FROM docker:29.6.1-dind AS dind
ARG VERSION=dev
LABEL org.opencontainers.image.source="https://github.com/hanzo-git/runner"
LABEL org.opencontainers.image.version="${VERSION}"
RUN apk add --no-cache s6 bash git tzdata nftables
COPY --from=builder /opt/src/runner/git-runner /usr/local/bin/git-runner
COPY scripts/run.sh /usr/local/bin/run.sh
COPY scripts/s6 /etc/s6
VOLUME /data
ENTRYPOINT ["s6-svscan","/etc/s6"]
### DIND-ROOTLESS VARIANT
#
#
FROM docker:29.6.1-dind-rootless AS dind-rootless
ARG VERSION=dev
LABEL org.opencontainers.image.source="https://github.com/hanzo-git/runner"
LABEL org.opencontainers.image.version="${VERSION}"
USER root
RUN apk add --no-cache s6 bash git tzdata nftables
COPY --from=builder /opt/src/runner/git-runner /usr/local/bin/git-runner
COPY scripts/run.sh /usr/local/bin/run.sh
COPY scripts/s6 /etc/s6
VOLUME /data
RUN mkdir -p /data && chown -R rootless:rootless /etc/s6 /data
ENV DOCKER_HOST=unix:///run/user/1000/docker.sock
USER rootless
ENTRYPOINT ["s6-svscan","/etc/s6"]
### BASIC VARIANT
#
#
FROM alpine:3.24 AS basic
ARG VERSION=dev
LABEL org.opencontainers.image.source="https://github.com/hanzo-git/runner"
LABEL org.opencontainers.image.version="${VERSION}"
RUN apk add --no-cache tini bash git tzdata
COPY --from=builder /opt/src/runner/git-runner /usr/local/bin/git-runner
COPY scripts/run.sh /usr/local/bin/run.sh
VOLUME /data
ENTRYPOINT ["/sbin/tini","--","run.sh"]