blob: 460b31d72c4c83774072f8b7ad58745021b0da80 [file] [log] [blame]
Leopold2aa8b182023-01-14 23:31:43 +01001FROM docker.io/fedora:37@sha256:3487c98481d1bba7e769cf7bcecd6343c2d383fdd6bed34ec541b6b23ef07664
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +02002
3RUN dnf -y upgrade && \
Leopold2aa8b182023-01-14 23:31:43 +01004 dnf -y install --setopt=tsflags=nodocs \
Leopold Schabel9a6cc562022-05-25 13:13:40 +02005 java-11-openjdk-headless \
Leopold2aa8b182023-01-14 23:31:43 +01006 dotnet-runtime-6.0 \
Leopoldea0a2c82022-06-30 19:49:18 +02007 jq \
Leopold2aa8b182023-01-14 23:31:43 +01008 tini \
Tim Windelschmidtc8480ee2023-04-05 13:25:03 +02009 patch \
Leopold2aa8b182023-01-14 23:31:43 +010010 golang && \
11 dnf clean all
Leopold Schabeld32d1ea2021-11-02 00:06:07 +010012
Leopold Schabel9a6cc562022-05-25 13:13:40 +020013# (java-11-openjdk-headless and tini are required for the Jenkins CI agent)
Leopoldea0a2c82022-06-30 19:49:18 +020014# (dotnet-runtime-5.0 and jq are required for the GitHub Actions runner)
Leopold2aa8b182023-01-14 23:31:43 +010015# (golang is required for us to build bazelisk - see below)
Serge Bazanski5aa494f2021-05-18 18:57:10 +020016
Tim Windelschmidtcff8eb92023-04-04 12:21:00 +020017# Install gcloud tooling
18RUN 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
23ENV PATH="/opt/google-cloud-sdk/bin:${PATH}"
24
Leopold2aa8b182023-01-14 23:31:43 +010025# Create CI build user. It is used by CI infrastructure to run build agents as.
Serge Bazanski5aa494f2021-05-18 18:57:10 +020026# 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.
29RUN set -e -x ;\
30 useradd -u 500 -U -m -d /home/ci ci
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020031
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020032# Use a shared Go module cache for gazelle
33# https://github.com/bazelbuild/bazel-gazelle/pull/535
34ENV GO_REPOSITORY_USE_HOST_CACHE=1
35
Leopold2aa8b182023-01-14 23:31:43 +010036USER ci
Serge Bazanskie7bb94c2021-07-02 17:11:58 +020037
Leopold2aa8b182023-01-14 23:31:43 +010038# Install Bazelisk. We do not have to pin a checksum since Go automatically
39# relies on its built-in transparency log for pinning.
40RUN go install github.com/bazelbuild/bazelisk@v1.15.0
41ENV PATH="/home/ci/go/bin:${PATH}"
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020042
43WORKDIR /work