Compare commits
1 Commits
2007b691e4
...
422afb3fef
Author | SHA1 | Date | |
---|---|---|---|
422afb3fef |
15
Dockerfile
15
Dockerfile
@ -13,19 +13,13 @@ RUN make clean && make build
|
|||||||
FROM docker:25.0.5-dind
|
FROM docker:25.0.5-dind
|
||||||
USER root
|
USER root
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
git bash supervisor python3 py3-pip
|
git bash supervisor
|
||||||
|
|
||||||
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/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/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/run.sh /opt/act/run.sh
|
||||||
COPY --from=builder /opt/src/act_runner/scripts/rootless.sh /opt/act/rootless.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 * * *"
|
ENV DOCKER_PRUNE_INTERVAL="0 0 * * *"
|
||||||
|
|
||||||
# Add Crontab for root user
|
# Add Crontab for root user
|
||||||
@ -34,6 +28,11 @@ RUN echo "${DOCKER_PRUNE_INTERVAL} echo Pruning docker volumes && docker volume
|
|||||||
# Remove warning from supervisord about running as root
|
# Remove warning from supervisord about running as root
|
||||||
RUN sed -i '/\[supervisord\]/a user=root' /etc/supervisord.conf
|
RUN sed -i '/\[supervisord\]/a user=root' /etc/supervisord.conf
|
||||||
|
|
||||||
HEALTHCHECK --interval=30s --timeout=15s --start-period=30s --retries=3 CMD "/healthcheck.sh"
|
# Add Cron to supervisord
|
||||||
|
RUN echo "" >> /etc/supervisord.conf && \
|
||||||
|
echo "[program:cron]" >> /etc/supervisord.conf && \
|
||||||
|
echo "command=/usr/sbin/crond -f" >> /etc/supervisord.conf && \
|
||||||
|
echo "stdout_logfile=/dev/fd/1" >> /etc/supervisord.conf && \
|
||||||
|
echo "stdout_logfile_maxbytes=0" >> /etc/supervisord.conf
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
|
ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
|
@ -1,8 +0,0 @@
|
|||||||
[program:act_runner]
|
|
||||||
stdout_logfile=/dev/fd/1
|
|
||||||
stdout_logfile_maxbytes=0
|
|
||||||
redirect_stderr=true
|
|
||||||
command=/opt/act/rootless.sh
|
|
||||||
dependent_startup=true
|
|
||||||
dependent_startup_wait_for=dockerd:running
|
|
||||||
autostart=false
|
|
@ -1,5 +0,0 @@
|
|||||||
[program:cron]
|
|
||||||
command=/usr/sbin/crond -f
|
|
||||||
stdout_logfile=/dev/fd/1
|
|
||||||
stdout_logfile_maxbytes=0
|
|
||||||
redirect_stderr=true
|
|
@ -1,8 +0,0 @@
|
|||||||
[program:dockerd]
|
|
||||||
command=/usr/local/bin/dockerd-entrypoint.sh
|
|
||||||
stdout_logfile_maxbytes=0
|
|
||||||
stdout_logfile=/dev/fd/1
|
|
||||||
redirect_stderr=true
|
|
||||||
startsecs=20
|
|
||||||
dependent_startup=true
|
|
||||||
autostart=false
|
|
@ -1,28 +0,0 @@
|
|||||||
[supervisord]
|
|
||||||
nodaemon=true
|
|
||||||
logfile=/dev/null
|
|
||||||
logfile_maxbytes=0
|
|
||||||
|
|
||||||
[include]
|
|
||||||
files = /etc/supervisor.d/*.conf
|
|
||||||
|
|
||||||
[unix_http_server]
|
|
||||||
file=/run/supervisord.sock
|
|
||||||
|
|
||||||
[supervisorctl]
|
|
||||||
serverurl=unix:///run/supervisord.sock
|
|
||||||
|
|
||||||
[rpcinterface:supervisor]
|
|
||||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
|
||||||
|
|
||||||
#[eventlistener:processes]
|
|
||||||
#command=bash -c "echo READY && read line && kill -SIGQUIT $PPID"
|
|
||||||
#events=PROCESS_STATE_STOPPED,PROCESS_STATE_EXITED,PROCESS_STATE_FATAL
|
|
||||||
|
|
||||||
[eventlistener:dependentstartup]
|
|
||||||
command=python -m supervisord_dependent_startup
|
|
||||||
autostart=true
|
|
||||||
autorestart=unexpected
|
|
||||||
startretries=0
|
|
||||||
exitcodes=0,3
|
|
||||||
events=PROCESS_STATE
|
|
@ -1,7 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Check docker socket is running
|
|
||||||
ls -l /run | grep docker.sock
|
|
||||||
|
|
||||||
# Check act is running
|
|
||||||
/usr/bin/supervisorctl status act_runner | grep RUNNING
|
|
Loading…
x
Reference in New Issue
Block a user