• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Self-Hosted IBM Z Github Actions Runner.
2
3# Temporary image: amd64 dependencies.
4FROM amd64/ubuntu:20.04 as ld-prefix
5ENV DEBIAN_FRONTEND=noninteractive
6RUN apt-get update && apt-get -y install ca-certificates libicu66 libssl1.1
7
8# Main image.
9FROM s390x/ubuntu:20.04
10
11# Packages for libbpf testing that are not installed by .github/actions/setup.
12ENV DEBIAN_FRONTEND=noninteractive
13RUN apt-get update && apt-get -y install \
14        bc \
15        bison \
16        cmake \
17        cpu-checker \
18        curl \
19        flex \
20        git \
21        jq \
22        linux-image-generic \
23        qemu-system-s390x \
24        rsync \
25        software-properties-common \
26        sudo \
27        tree
28
29# amd64 dependencies.
30COPY --from=ld-prefix / /usr/x86_64-linux-gnu/
31RUN ln -fs ../lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 /usr/x86_64-linux-gnu/lib64/
32RUN ln -fs /etc/resolv.conf /usr/x86_64-linux-gnu/etc/
33ENV QEMU_LD_PREFIX=/usr/x86_64-linux-gnu
34
35# amd64 Github Actions Runner.
36ARG version=2.285.0
37RUN useradd -m actions-runner
38RUN echo "actions-runner ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers
39RUN echo "Defaults env_keep += \"DEBIAN_FRONTEND\"" >>/etc/sudoers
40RUN usermod -a -G kvm actions-runner
41USER actions-runner
42ENV USER=actions-runner
43WORKDIR /home/actions-runner
44RUN curl -L https://github.com/actions/runner/releases/download/v${version}/actions-runner-linux-x64-${version}.tar.gz | tar -xz
45VOLUME /home/actions-runner
46
47# Scripts.
48COPY fs/ /
49ENTRYPOINT ["/usr/bin/entrypoint"]
50CMD ["/usr/bin/actions-runner"]
51