|
| 1 | +# Self-Hosted IBM Z Github Actions Runner. |
| 2 | +ARG UBUNTU_VERSION=noble |
| 3 | +FROM --platform=linux/s390x ubuntu:${UBUNTU_VERSION} |
| 4 | +ENV DEBIAN_FRONTEND=noninteractive |
| 5 | + |
| 6 | +RUN apt-get update && apt-get -y install \ |
| 7 | + bc bison cmake cpu-checker curl dumb-init ethtool flex gawk git \ |
| 8 | + iproute2 iptables iputils-ping jq keyutils linux-image-generic \ |
| 9 | + python3 rsync software-properties-common sudo tree wget zstd |
| 10 | +RUN apt-get -y install \ |
| 11 | + qemu-guest-agent qemu-kvm qemu-utils \ |
| 12 | + qemu-system-arm qemu-system-s390x qemu-system-x86 |
| 13 | +RUN apt-get install -y \ |
| 14 | + aspnetcore-runtime-8.0 |
| 15 | +RUN apt-get clean |
| 16 | + |
| 17 | +ARG version=2.321.0 |
| 18 | +ARG homedir=/actions-runner |
| 19 | + |
| 20 | +# Copy scripts from myoung34/docker-github-actions-runner |
| 21 | +RUN curl -L https://raw.githubusercontent.com/myoung34/docker-github-actions-runner/${version}/entrypoint.sh -o /entrypoint.sh && chmod 755 /entrypoint.sh |
| 22 | +RUN curl -L https://raw.githubusercontent.com/myoung34/docker-github-actions-runner/${version}/token.sh -o /token.sh && chmod 755 /token.sh |
| 23 | + |
| 24 | +RUN useradd -d ${homedir} -m runner |
| 25 | +RUN echo "runner ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers |
| 26 | +RUN echo "Defaults env_keep += \"DEBIAN_FRONTEND\"" >>/etc/sudoers |
| 27 | +# Make sure kvm group exists. This is a no-op when it does. |
| 28 | +RUN addgroup --system kvm |
| 29 | +RUN usermod -a -G kvm runner |
| 30 | +USER runner |
| 31 | +ENV USER=runner |
| 32 | +WORKDIR ${homedir} |
| 33 | + |
| 34 | +RUN curl -L https://github.com/theihor/s390x-actions-runner/releases/download/v${version}/actions-runner-linux-s390x-${version}.tar.gz | tar -xz |
| 35 | +USER root |
| 36 | + |
| 37 | +ENTRYPOINT ["/entrypoint.sh"] |
| 38 | +CMD ["./bin/Runner.Listener", "run", "--startuptype", "service"] |
0 commit comments