gitea-act-runner/Dockerfile
Renovate Bot 123b8b494b
All checks were successful
Build Develop Image / Build Image (push) Successful in 6m30s
Build Develop Image / Notify (push) Successful in 3s
Update docker Docker tag to v27 (#21)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| docker | final | major | `25.0.5-dind` -> `27.3.1-dind` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4xOC4xMiIsInVwZGF0ZWRJblZlciI6IjM4LjE4LjEyIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6W119-->

Reviewed-on: #21
Co-authored-by: Renovate Bot <renovate@mrmeeb.stream>
Co-committed-by: Renovate Bot <renovate@mrmeeb.stream>
2024-09-28 22:14:49 +00:00

42 lines
1.4 KiB
Docker

FROM golang:1.23-alpine3.20 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 ACT_VERSION=0.2.11
RUN git clone --depth 1 --branch v${ACT_VERSION} https://gitea.com/gitea/act_runner /opt/src/act_runner
WORKDIR /opt/src/act_runner
RUN make clean && make build
FROM docker:27.3.1-dind
USER root
RUN apk add --no-cache \
git bash supervisor python3 py3-pip
RUN pip3 install --break-system-packages supervisord-dependent-startup
COPY --from=builder /opt/src/act_runner/act_runner /usr/local/bin/act_runner
COPY --from=builder /opt/src/act_runner/scripts/supervisord.conf /etc/supervisord.conf
COPY --from=builder /opt/src/act_runner/scripts/run.sh /opt/act/run.sh
COPY --from=builder /opt/src/act_runner/scripts/rootless.sh /opt/act/rootless.sh
COPY /root /
RUN chmod +x /healthcheck.sh
ENV DOCKER_PRUNE_INTERVAL="0 0 * * *"
# Supress tini warning
ENV TINI_SUBREAPER=true
# Add Crontab for root user
RUN echo "${DOCKER_PRUNE_INTERVAL} echo Pruning docker volumes && docker volume prune -af" > .crontab.txt && crontab .crontab.txt
# Remove warning from supervisord about running as root
RUN sed -i '/\[supervisord\]/a user=root' /etc/supervisord.conf
HEALTHCHECK --interval=30s --timeout=15s --start-period=30s --retries=3 CMD "/healthcheck.sh"
ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]