Leopold | 2aa8b18 | 2023-01-14 23:31:43 +0100 | [diff] [blame] | 1 | FROM docker.io/fedora:37@sha256:3487c98481d1bba7e769cf7bcecd6343c2d383fdd6bed34ec541b6b23ef07664 |
Hendrik Hofstadt | 0d7c91e | 2019-10-23 21:44:47 +0200 | [diff] [blame] | 2 | |
| 3 | RUN dnf -y upgrade && \ |
Leopold | 2aa8b18 | 2023-01-14 23:31:43 +0100 | [diff] [blame] | 4 | dnf -y install --setopt=tsflags=nodocs \ |
Leopold Schabel | 9a6cc56 | 2022-05-25 13:13:40 +0200 | [diff] [blame] | 5 | java-11-openjdk-headless \ |
Leopold | 2aa8b18 | 2023-01-14 23:31:43 +0100 | [diff] [blame] | 6 | dotnet-runtime-6.0 \ |
Leopold | ea0a2c8 | 2022-06-30 19:49:18 +0200 | [diff] [blame] | 7 | jq \ |
Leopold | 2aa8b18 | 2023-01-14 23:31:43 +0100 | [diff] [blame] | 8 | tini \ |
Tim Windelschmidt | c8480ee | 2023-04-05 13:25:03 +0200 | [diff] [blame] | 9 | patch \ |
Leopold | 2aa8b18 | 2023-01-14 23:31:43 +0100 | [diff] [blame] | 10 | golang && \ |
| 11 | dnf clean all |
Leopold Schabel | d32d1ea | 2021-11-02 00:06:07 +0100 | [diff] [blame] | 12 | |
Leopold Schabel | 9a6cc56 | 2022-05-25 13:13:40 +0200 | [diff] [blame] | 13 | # (java-11-openjdk-headless and tini are required for the Jenkins CI agent) |
Leopold | ea0a2c8 | 2022-06-30 19:49:18 +0200 | [diff] [blame] | 14 | # (dotnet-runtime-5.0 and jq are required for the GitHub Actions runner) |
Leopold | 2aa8b18 | 2023-01-14 23:31:43 +0100 | [diff] [blame] | 15 | # (golang is required for us to build bazelisk - see below) |
Serge Bazanski | 5aa494f | 2021-05-18 18:57:10 +0200 | [diff] [blame] | 16 | |
Tim Windelschmidt | cff8eb9 | 2023-04-04 12:21:00 +0200 | [diff] [blame] | 17 | # Install gcloud tooling |
| 18 | RUN curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-424.0.0-linux-x86_64.tar.gz && \ |
| 19 | tar -xf google-cloud-cli-424.0.0-linux-x86_64.tar.gz && \ |
| 20 | mv google-cloud-sdk /opt/ && \ |
| 21 | /opt/google-cloud-sdk/install.sh |
| 22 | |
| 23 | ENV PATH="/opt/google-cloud-sdk/bin:${PATH}" |
| 24 | |
Leopold | 2aa8b18 | 2023-01-14 23:31:43 +0100 | [diff] [blame] | 25 | # Create CI build user. It is used by CI infrastructure to run build agents as. |
Serge Bazanski | 5aa494f | 2021-05-18 18:57:10 +0200 | [diff] [blame] | 26 | # The newly created user will have a UID of 500, and a corresponding CI group |
| 27 | # of GID 500 will be created as well. This UID:GID pair's numeric values are |
| 28 | # relied on by the CI infrastructure and must not change without coordination. |
| 29 | RUN set -e -x ;\ |
| 30 | useradd -u 500 -U -m -d /home/ci ci |
Hendrik Hofstadt | 0d7c91e | 2019-10-23 21:44:47 +0200 | [diff] [blame] | 31 | |
Hendrik Hofstadt | 0d7c91e | 2019-10-23 21:44:47 +0200 | [diff] [blame] | 32 | # Use a shared Go module cache for gazelle |
| 33 | # https://github.com/bazelbuild/bazel-gazelle/pull/535 |
| 34 | ENV GO_REPOSITORY_USE_HOST_CACHE=1 |
| 35 | |
Leopold | 2aa8b18 | 2023-01-14 23:31:43 +0100 | [diff] [blame] | 36 | USER ci |
Serge Bazanski | e7bb94c | 2021-07-02 17:11:58 +0200 | [diff] [blame] | 37 | |
Leopold | 2aa8b18 | 2023-01-14 23:31:43 +0100 | [diff] [blame] | 38 | # Install Bazelisk. We do not have to pin a checksum since Go automatically |
| 39 | # relies on its built-in transparency log for pinning. |
| 40 | RUN go install github.com/bazelbuild/bazelisk@v1.15.0 |
| 41 | ENV PATH="/home/ci/go/bin:${PATH}" |
Hendrik Hofstadt | 0d7c91e | 2019-10-23 21:44:47 +0200 | [diff] [blame] | 42 | |
| 43 | WORKDIR /work |