blob: 4f6f4ec0e87bbbe4f091562cff8cd27c6ef65f37 [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 \
9 golang && \
10 dnf clean all
Leopold Schabeld32d1ea2021-11-02 00:06:07 +010011
Leopold Schabel9a6cc562022-05-25 13:13:40 +020012# (java-11-openjdk-headless and tini are required for the Jenkins CI agent)
Leopoldea0a2c82022-06-30 19:49:18 +020013# (dotnet-runtime-5.0 and jq are required for the GitHub Actions runner)
Leopold2aa8b182023-01-14 23:31:43 +010014# (golang is required for us to build bazelisk - see below)
Serge Bazanski5aa494f2021-05-18 18:57:10 +020015
Tim Windelschmidtcff8eb92023-04-04 12:21:00 +020016# Install gcloud tooling
17RUN curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-424.0.0-linux-x86_64.tar.gz && \
18 tar -xf google-cloud-cli-424.0.0-linux-x86_64.tar.gz && \
19 mv google-cloud-sdk /opt/ && \
20 /opt/google-cloud-sdk/install.sh
21
22ENV PATH="/opt/google-cloud-sdk/bin:${PATH}"
23
Leopold2aa8b182023-01-14 23:31:43 +010024# Create CI build user. It is used by CI infrastructure to run build agents as.
Serge Bazanski5aa494f2021-05-18 18:57:10 +020025# The newly created user will have a UID of 500, and a corresponding CI group
26# of GID 500 will be created as well. This UID:GID pair's numeric values are
27# relied on by the CI infrastructure and must not change without coordination.
28RUN set -e -x ;\
29 useradd -u 500 -U -m -d /home/ci ci
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020030
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020031# Use a shared Go module cache for gazelle
32# https://github.com/bazelbuild/bazel-gazelle/pull/535
33ENV GO_REPOSITORY_USE_HOST_CACHE=1
34
Leopold2aa8b182023-01-14 23:31:43 +010035USER ci
Serge Bazanskie7bb94c2021-07-02 17:11:58 +020036
Leopold2aa8b182023-01-14 23:31:43 +010037# Install Bazelisk. We do not have to pin a checksum since Go automatically
38# relies on its built-in transparency log for pinning.
39RUN go install github.com/bazelbuild/bazelisk@v1.15.0
40ENV PATH="/home/ci/go/bin:${PATH}"
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020041
42WORKDIR /work