mirror of
https://gitea.com/gitea/act_runner.git
synced 2025-10-13 15:24:50 +00:00
* podman creates an folder * dind sees a folder and fails Was adding the mount a mistake?, a feature with side effects? Closes https://gitea.com/gitea/act_runner/issues/750 Reviewed-on: https://gitea.com/gitea/act_runner/pulls/751 Reviewed-by: Jason Song <wolfogre@noreply.gitea.com> Co-authored-by: ChristopherHX <christopher.homberger@web.de> Co-committed-by: ChristopherHX <christopher.homberger@web.de>
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: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: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"]
|