mirror of
https://gitea.com/gitea/act_runner.git
synced 2025-09-06 19:41:31 +02:00
Relevant: https://gitea.com/gitea/act_runner/issues/735 See my example below, `edit` is my PR, `non-edit` is the origin/main. ``` dselen@N-DESKTOP1:~/development/act_runner$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE runner edit b12322f8c3f0 26 seconds ago 43.5MB runner non-edit e5593ad32c16 34 minutes ago 43.1MB dselen@N-DESKTOP1:~/development/act_runner$ docker run -d -e TZ=Europe/Amsterdam runner:non-edit 5f26979515f461a2a7e342aa586d7b91224d2d3c3dcf1ed0c1e7293ff00645a4 dselen@N-DESKTOP1:~/development/act_runner$ docker run -d -e TZ=Europe/Amsterdam runner:edit 9cc5fc6b364cf07776d97c6c60c03f23372eb2c93c7da8d3d80f4f6dc2a6b10e dselen@N-DESKTOP1:~/development/act_runner$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 9cc5fc6b364c runner:edit "/sbin/tini -- run.sh" 2 seconds ago Up 2 seconds serene_bardeen 5f26979515f4 runner:non-edit "/sbin/tini -- run.sh" 5 seconds ago Up 5 seconds jovial_euler dselen@N-DESKTOP1:~/development/act_runner$ docker exec -it jovial_euler bash 5f26979515f4:/# date Thu Aug 21 16:40:35 UTC 2025 dselen@N-DESKTOP1:~/development/act_runner$ docker exec -it serene_bardeen bash 9cc5fc6b364c:/# date Thu Aug 21 18:40:42 CEST 2025 ``` I do not see why this would not be acceptable, its only 400KB Regards. Reviewed-on: https://gitea.com/gitea/act_runner/pulls/738 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: ChristopherHX <christopherhx@noreply.gitea.com> Co-authored-by: DaanSelen <daanselen@noreply.gitea.com> Co-committed-by: DaanSelen <daanselen@noreply.gitea.com>
67 lines
1.3 KiB
Docker
67 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 /var/run/docker.sock
|
|
|
|
VOLUME /data
|
|
|
|
ENTRYPOINT ["/sbin/tini","--","run.sh"]
|