mirror of
https://gitea.com/gitea/act_runner.git
synced 2025-11-27 01:48:36 +01:00
The effect probably does not **yet** occur in the published versions because the last publication took place before the release of Docker v29. Therefore, no one should expect version 29 of Docker to be used, so there are basically no side effects. --- fix #768 Reviewed-on: https://gitea.com/gitea/act_runner/pulls/769 Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com> Co-authored-by: Max P. <mail@0xMax42.io> Co-committed-by: Max P. <mail@0xMax42.io>
65 lines
1.3 KiB
Docker
65 lines
1.3 KiB
Docker
### BUILDER STAGE
|
|
#
|
|
#
|
|
FROM golang:1.24-alpine 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/act_runner
|
|
WORKDIR /opt/src/act_runner
|
|
|
|
RUN make clean && make build
|
|
|
|
### DIND VARIANT
|
|
#
|
|
#
|
|
FROM docker:28-dind AS dind
|
|
|
|
RUN apk add --no-cache s6 bash git tzdata
|
|
|
|
COPY --from=builder /opt/src/act_runner/act_runner /usr/local/bin/act_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:28-dind-rootless AS dind-rootless
|
|
|
|
USER root
|
|
RUN apk add --no-cache s6 bash git tzdata
|
|
|
|
COPY --from=builder /opt/src/act_runner/act_runner /usr/local/bin/act_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 AS basic
|
|
RUN apk add --no-cache tini bash git tzdata
|
|
|
|
COPY --from=builder /opt/src/act_runner/act_runner /usr/local/bin/act_runner
|
|
COPY scripts/run.sh /usr/local/bin/run.sh
|
|
|
|
VOLUME /data
|
|
|
|
ENTRYPOINT ["/sbin/tini","--","run.sh"]
|