additional comments

This commit is contained in:
Chris Cureau 2023-06-10 12:11:48 +00:00
parent e95566afca
commit b8f9e7fc75
5 changed files with 15 additions and 12 deletions

View file

@ -11,6 +11,6 @@ FROM alpine:3.18
RUN apk add --no-cache git bash tini
COPY --from=builder /opt/src/act_runner/act_runner /usr/local/bin/act_runner
COPY run.sh /opt/act/run.sh
COPY scripts/run.sh /opt/act/run.sh
ENTRYPOINT ["/sbin/tini","--","/opt/act/run.sh"]

View file

@ -1,6 +1,6 @@
FROM golang:1.20-alpine3.17 as builder
FROM golang:1.20-alpine3.18 as builder
# Do not remove `git` here, it is required for getting runner version when executing `make build`
RUN apk add --no-cache make=4.3-r1 git=2.38.5-r0
RUN apk add --no-cache make git
COPY . /opt/src/act_runner
WORKDIR /opt/src/act_runner
@ -10,12 +10,12 @@ RUN make clean && make build
FROM docker:dind-rootless
USER root
RUN apk add --no-cache \
git=2.40.1-r0 bash=5.2.15-r3 supervisor=4.2.5-r2 \
&& rm -rf /var/cache/apk/*
git bash supervisor
COPY --from=builder /opt/src/act_runner/act_runner /usr/local/bin/act_runner
COPY /scripts/supervisord.conf /etc/supervisord.conf
COPY /scripts/run.sh /opt/act/run.sh
COPY /scripts/rootless.sh /opt/act/rootless.sh
RUN mkdir /data \
&& chown rootless:rootless /data

9
scripts/rootless.sh Executable file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
# wait for docker daemon
while ! nc -z localhost 2376 </dev/null; do
echo 'waiting for docker daemon...'
sleep 5
done
. /opt/act/run.sh

View file

@ -44,10 +44,4 @@ fi
# Prevent reading the token from the act_runner process
unset GITEA_RUNNER_REGISTRATION_TOKEN
# wait for docker daemon
while ! nc -z localhost 2376 </dev/null; do
echo 'waiting for docker daemon...'
sleep 5
done
act_runner daemon ${CONFIG_ARG}

View file

@ -10,4 +10,4 @@ command=/usr/local/bin/dockerd-entrypoint.sh
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
redirect_stderr=true
command=/opt/act/run.sh
command=/opt/act/rootless.sh