32 lines
1.2 KiB
Docker
32 lines
1.2 KiB
Docker
FROM gitea/act_runner:0.6.1-dind
|
|
|
|
# gVisor release used to sandbox every CI job container.
|
|
ARG GVISOR_RELEASE=release-20261102.0
|
|
|
|
RUN apk add --no-cache curl tar bzip2 \
|
|
&& curl -fsSL "https://github.com/google/gvisor/releases/download/${GVISOR_RELEASE}/gvisor-x86_64.tar.bz2" \
|
|
| tar -xj -C /usr/local/bin \
|
|
&& chmod +x /usr/local/bin/runsc \
|
|
/usr/local/bin/containerd-shim-runsc-v1 \
|
|
/usr/local/bin/gvisor-bin/* \
|
|
&& runsc --version
|
|
|
|
COPY daemon.json /etc/docker/daemon.json
|
|
COPY config.yaml /etc/act_runner/config.yaml
|
|
COPY gvisor-entrypoint.sh /usr/local/bin/gvisor-entrypoint.sh
|
|
COPY act-runner-run.sh /etc/s6/act_runner/run
|
|
COPY docker-run.sh /etc/s6/docker/run
|
|
COPY start-sandboxed-dind.sh /usr/local/bin/start-sandboxed-dind.sh
|
|
COPY start-dind.sh /opt/gvisor-dind/start-dind.sh
|
|
RUN chmod +x /usr/local/bin/gvisor-entrypoint.sh \
|
|
/usr/local/bin/start-sandboxed-dind.sh \
|
|
/etc/s6/act_runner/run \
|
|
/etc/s6/docker/run \
|
|
/opt/gvisor-dind/start-dind.sh
|
|
|
|
ENV CONFIG_FILE=/etc/act_runner/config.yaml
|
|
|
|
# Keep the base image's s6 supervision (starts dockerd, then act_runner).
|
|
ENTRYPOINT ["/usr/local/bin/gvisor-entrypoint.sh"]
|
|
CMD ["s6-svscan", "/etc/s6"]
|