actions-runner.Dockerfile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Self-Hosted IBM Z Github Actions Runner.
  2. FROM almalinux:9
  3. RUN dnf update -y -q && \
  4. dnf install -y -q --enablerepo=crb wget git which sudo jq \
  5. cmake make automake autoconf m4 libtool ninja-build python3-pip \
  6. gcc gcc-c++ clang llvm-toolset glibc-all-langpacks langpacks-en \
  7. glibc-static libstdc++-static libstdc++-devel libxslt-devel libxml2-devel
  8. RUN dnf install -y -q dotnet-sdk-6.0 && \
  9. echo "Using SDK - `dotnet --version`"
  10. COPY runner-s390x.patch /tmp/runner.patch
  11. COPY runner-global.json /tmp/global.json
  12. RUN cd /tmp && \
  13. git clone -q https://github.com/actions/runner && \
  14. cd runner && \
  15. git checkout $(git describe --tags $(git rev-list --tags --max-count=1)) -b build && \
  16. git apply /tmp/runner.patch && \
  17. cp -f /tmp/global.json src/global.json
  18. RUN cd /tmp/runner/src && \
  19. ./dev.sh layout && \
  20. ./dev.sh package && \
  21. rm -rf /root/.dotnet /root/.nuget
  22. RUN useradd -c "Action Runner" -m actions-runner && \
  23. usermod -L actions-runner
  24. RUN tar -xf /tmp/runner/_package/*.tar.gz -C /home/actions-runner && \
  25. chown -R actions-runner:actions-runner /home/actions-runner
  26. #VOLUME /home/actions-runner
  27. RUN rm -rf /tmp/runner /var/cache/dnf/* /tmp/runner.patch /tmp/global.json && \
  28. dnf clean all
  29. USER actions-runner
  30. # Scripts.
  31. COPY fs/ /
  32. WORKDIR /home/actions-runner
  33. ENTRYPOINT ["/usr/bin/entrypoint"]
  34. CMD ["/usr/bin/actions-runner"]