blob: 39bbb00b5996916c3f76a3a0b6e1e4ad166dbd42 [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
Leopold2aa8b182023-01-14 23:31:43 +010016# Create CI build user. It is used by CI infrastructure to run build agents as.
Serge Bazanski5aa494f2021-05-18 18:57:10 +020017# The newly created user will have a UID of 500, and a corresponding CI group
18# of GID 500 will be created as well. This UID:GID pair's numeric values are
19# relied on by the CI infrastructure and must not change without coordination.
20RUN set -e -x ;\
21 useradd -u 500 -U -m -d /home/ci ci
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020022
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020023# Use a shared Go module cache for gazelle
24# https://github.com/bazelbuild/bazel-gazelle/pull/535
25ENV GO_REPOSITORY_USE_HOST_CACHE=1
26
Leopold2aa8b182023-01-14 23:31:43 +010027USER ci
Serge Bazanskie7bb94c2021-07-02 17:11:58 +020028
Leopold2aa8b182023-01-14 23:31:43 +010029# Install Bazelisk. We do not have to pin a checksum since Go automatically
30# relies on its built-in transparency log for pinning.
31RUN go install github.com/bazelbuild/bazelisk@v1.15.0
32ENV PATH="/home/ci/go/bin:${PATH}"
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020033
34WORKDIR /work