blob: aa79dc7ac65ee035e5564631de9b41b5b851cb6e [file] [log] [blame]
Lorenz Brun942f5e22022-01-27 15:03:10 +01001FROM fedora:35
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +02002
3RUN dnf -y upgrade && \
Lorenz Brunfd166512020-04-01 17:29:45 +02004 dnf -y install \
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +02005 "@Development Tools" \
6 g++ \
Lorenz Brun605efbe2021-09-28 14:01:01 +02007 llvm \
Lorenz Brun942f5e22022-01-27 15:03:10 +01008 clang \
Lorenz Brun605efbe2021-09-28 14:01:01 +02009 lld \
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020010 libuuid-devel \
11 python3 \
12 nasm \
13 acpica-tools \
14 gettext-devel \
15 autoconf \
16 bison \
17 libtool \
18 automake \
19 flex \
20 glibc-static \
21 elfutils-libelf-devel \
22 libblkid-devel \
23 lz4 \
24 bc \
25 hostname \
26 which \
27 swtpm-tools \
28 rsync \
Hendrik Hofstadt3e6018f2019-10-28 21:29:42 +010029 qemu-system-x86-core \
Leopold Schabela4516f92019-12-04 20:27:05 +000030 expect \
31 grpc-cli \
Serge Bazanski7a1b10c2020-02-11 10:02:21 +010032 nc \
Lorenz Brunfd166512020-04-01 17:29:45 +020033 python-unversioned-command \
Leopold Schabeld32d1ea2021-11-02 00:06:07 +010034 openssl-devel \
Leopold Schabel9a6cc562022-05-25 13:13:40 +020035 java-11-openjdk-headless \
Leopoldea0a2c82022-06-30 19:49:18 +020036 dotnet-runtime-5.0 \
37 jq \
Leopold Schabel9a6cc562022-05-25 13:13:40 +020038 tini
Leopold Schabeld32d1ea2021-11-02 00:06:07 +010039
40
Leopold Schabel9a6cc562022-05-25 13:13:40 +020041# (java-11-openjdk-headless and tini are required for the Jenkins CI agent)
Leopoldea0a2c82022-06-30 19:49:18 +020042# (dotnet-runtime-5.0 and jq are required for the GitHub Actions runner)
Serge Bazanski5aa494f2021-05-18 18:57:10 +020043
44# Create CI build user. This is not used by scripts/bin/bazel, but instead only
45# used by CI infrastructure to run build agents as.
46# The newly created user will have a UID of 500, and a corresponding CI group
47# of GID 500 will be created as well. This UID:GID pair's numeric values are
48# relied on by the CI infrastructure and must not change without coordination.
49RUN set -e -x ;\
50 useradd -u 500 -U -m -d /home/ci ci
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020051
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020052# Install Bazel binary
53RUN curl -o /usr/local/bin/bazel \
Lorenz Brund23365d2022-03-30 14:15:12 +020054 https://releases.bazel.build/4.2.2/release/bazel-4.2.2-linux-x86_64 && \
55 echo '11dea6c7cfd866ed520af19a6bb1d952f3e9f4ee60ffe84e63c0825d95cb5859 /usr/local/bin/bazel' | sha256sum --check && \
Lorenz Brunc452a8d2020-04-20 14:09:39 +020056 chmod +x /usr/local/bin/bazel
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020057
58# Use a shared Go module cache for gazelle
59# https://github.com/bazelbuild/bazel-gazelle/pull/535
60ENV GO_REPOSITORY_USE_HOST_CACHE=1
61
Serge Bazanskie7bb94c2021-07-02 17:11:58 +020062# Install ibazel (bazel-watcher)
63RUN set -e -x ;\
64 cd /tmp ;\
65 git clone -b v0.15.10 https://github.com/bazelbuild/bazel-watcher ;\
66 cd bazel-watcher ;\
67 [ $(git rev-parse HEAD) == "84cab6f15f64850fb972ea88701e634c8b611301" ] ;\
68 bazel --output_user_root /tmp/bazel-watcher-cache build //ibazel ;\
69 cp bazel-bin/ibazel/linux_amd64_stripped/ibazel /usr/local/bin/ibazel ;\
70 cd /tmp ;\
71 rm -rf bazel-watcher bazel-watcher-cache
72
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020073# --userns=keep-id uses the workdir as $HOME otherwise
74RUN mkdir /user
75ENV HOME=/user
76
77WORKDIR /work