Files
act_runner/Dockerfile
dcsunny b93ab66e54
Some checks failed
release-nightly / goreleaser (push) Waiting to run
release-nightly / release-image (map[tag_suffix:-dind target:dind]) (push) Waiting to run
release-nightly / release-image (map[tag_suffix: target:basic]) (push) Failing after 1m32s
release-nightly / release-image (map[tag_suffix:-dind-rootless target:dind-rootless]) (push) Failing after 3m12s
checks / check and test (push) Failing after 31s
chore(build): 设置默认 GOPROXY 为阿里云镜像
- 在 Dockerfile 中设置 GOPROXY 默认值为 https://mirrors.aliyun.com/goproxy/,direct
- 在 Makefile 中添加 GOPROXY 变量并导出
- 配置 Go 模块代理以提高依赖下载速度
2026-01-30 11:04:25 +08:00

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:-https://mirrors.aliyun.com/goproxy/,direct}
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"]