diff --git a/README.md b/README.md index 0eaebbe..9f2a7bc 100644 --- a/README.md +++ b/README.md @@ -177,7 +177,7 @@ docker runner. Example uses root, but it should be very similar to setup under non-root user. -Build image setting proper platform architecture `amd64`, `arm64`, etc... +Build image (will compile from main branch) ```bash podman build --no-cache -t gitea-runner \ --build-arg ARCH="arm64" \ @@ -234,11 +234,11 @@ podman run --rm -d --privileged --name gitea-podman \ system service --time=0 unix:///podman/docker.sock ``` -Now start container with runner (it will fail if docker.sock is missing) +Now start container with runner ```bash podman run --rm -d --name gitea-runner \ -v /root/act-runner/runner/:/etc/runner:ro,Z \ - -v /root/act-runner/podman/docker.sock:/var/run/docker.sock:rw,z \ + -v /root/act-runner/podman:/podman:rw,z \ gitea-runner:latest \ daemon -c /etc/runner/config.yaml ``` diff --git a/gitea-runner/Dockerfile b/gitea-runner/Dockerfile index bd26afa..ab8fdf7 100644 --- a/gitea-runner/Dockerfile +++ b/gitea-runner/Dockerfile @@ -1,12 +1,20 @@ FROM quay.io/podman/stable -ENV VERSION="0.2.6" -ARG ARCH="amd64" +RUN mkdir -p /opt /var/run && \ + ln -sf /podman/docker.sock /var/run/docker.sock -RUN curl -o /act_runner https://gitea.com/gitea/act_runner/releases/download/v0.2.6/act_runner-${VERSION}-linux-${ARCH} && \ - chmod +x /act_runner && \ - chown podman /act_runner +RUN dnf install -y make go git && \ + cd /tmp && \ + git clone https://gitea.com/gitea/act_runner.git && \ + cd act_runner && \ + make build && \ + mv /tmp/act_runner/act_runner /opt/ && \ + chown podman /opt/act_runner && \ + dnf remove -y make go git && \ + dnf autoremove -y && \ + dnf clean all && \ + rm -rf /tmp/* /root/go USER podman -ENTRYPOINT [ "/act_runner" ] +ENTRYPOINT [ "/opt/act_runner" ]