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 zlib-ng testing.
12ENV DEBIAN_FRONTEND=noninteractive
13RUN apt-get update && apt-get -y install \
14        cmake \
15        curl \
16        gcc \
17        git \
18        jq \
19        libxml2-dev \
20        libxslt-dev \
21        ninja-build \
22        python-is-python3 \
23        python3 \
24        python3-dev \
25        python3-pip
26
27# amd64 dependencies.
28COPY --from=ld-prefix / /usr/x86_64-linux-gnu/
29RUN ln -fs ../lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 /usr/x86_64-linux-gnu/lib64/
30RUN ln -fs /etc/resolv.conf /usr/x86_64-linux-gnu/etc/
31ENV QEMU_LD_PREFIX=/usr/x86_64-linux-gnu
32
33# amd64 Github Actions Runner.
34RUN useradd -m actions-runner
35USER actions-runner
36WORKDIR /home/actions-runner
37RUN curl -L https://github.com/actions/runner/releases/download/v2.287.1/actions-runner-linux-x64-2.287.1.tar.gz | tar -xz
38VOLUME /home/actions-runner
39
40# Scripts.
41COPY fs/ /
42ENTRYPOINT ["/usr/bin/entrypoint"]
43CMD ["/usr/bin/actions-runner"]
44