upgrade gitea-runner setup with compilation, and better socket handling
This commit is contained in:
parent
ced51b9d8e
commit
746bd5d6be
2 changed files with 17 additions and 9 deletions
|
@ -177,7 +177,7 @@ docker runner.
|
||||||
|
|
||||||
Example uses root, but it should be very similar to setup under non-root user.
|
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
|
```bash
|
||||||
podman build --no-cache -t gitea-runner \
|
podman build --no-cache -t gitea-runner \
|
||||||
--build-arg ARCH="arm64" \
|
--build-arg ARCH="arm64" \
|
||||||
|
@ -234,11 +234,11 @@ podman run --rm -d --privileged --name gitea-podman \
|
||||||
system service --time=0 unix:///podman/docker.sock
|
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
|
```bash
|
||||||
podman run --rm -d --name gitea-runner \
|
podman run --rm -d --name gitea-runner \
|
||||||
-v /root/act-runner/runner/:/etc/runner:ro,Z \
|
-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 \
|
gitea-runner:latest \
|
||||||
daemon -c /etc/runner/config.yaml
|
daemon -c /etc/runner/config.yaml
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,12 +1,20 @@
|
||||||
FROM quay.io/podman/stable
|
FROM quay.io/podman/stable
|
||||||
|
|
||||||
ENV VERSION="0.2.6"
|
RUN mkdir -p /opt /var/run && \
|
||||||
ARG ARCH="amd64"
|
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} && \
|
RUN dnf install -y make go git && \
|
||||||
chmod +x /act_runner && \
|
cd /tmp && \
|
||||||
chown podman /act_runner
|
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
|
USER podman
|
||||||
|
|
||||||
ENTRYPOINT [ "/act_runner" ]
|
ENTRYPOINT [ "/opt/act_runner" ]
|
||||||
|
|
Loading…
Reference in a new issue