blob: a92824ce0e097886d4e5f9517d1ae6dec115025f [file] [log] [blame]
Lorenz Brunc452a8d2020-04-20 14:09:39 +02001FROM fedora:32
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 \
8 lld \
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +02009 libuuid-devel \
10 python3 \
11 nasm \
12 acpica-tools \
13 gettext-devel \
14 autoconf \
15 bison \
16 libtool \
17 automake \
18 flex \
19 glibc-static \
20 elfutils-libelf-devel \
21 libblkid-devel \
22 lz4 \
23 bc \
24 hostname \
25 which \
26 swtpm-tools \
27 rsync \
Hendrik Hofstadt3e6018f2019-10-28 21:29:42 +010028 qemu-system-x86-core \
Leopold Schabela4516f92019-12-04 20:27:05 +000029 expect \
30 grpc-cli \
Serge Bazanski7a1b10c2020-02-11 10:02:21 +010031 nc \
Lorenz Brunfd166512020-04-01 17:29:45 +020032 python-unversioned-command \
Leopold Schabeld32d1ea2021-11-02 00:06:07 +010033 openssl-devel \
34 java-11-openjdk-headless
35
36
37# (java-11-openjdk-headless is required for the Jenkins CI agent)
38
Serge Bazanski5aa494f2021-05-18 18:57:10 +020039
40# Create CI build user. This is not used by scripts/bin/bazel, but instead only
41# used by CI infrastructure to run build agents as.
42# The newly created user will have a UID of 500, and a corresponding CI group
43# of GID 500 will be created as well. This UID:GID pair's numeric values are
44# relied on by the CI infrastructure and must not change without coordination.
45RUN set -e -x ;\
46 useradd -u 500 -U -m -d /home/ci ci
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020047
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020048# Install Bazel binary
49RUN curl -o /usr/local/bin/bazel \
Lorenz Brun2073ce32021-02-03 18:52:59 +010050 https://releases.bazel.build/4.0.0/release/bazel-4.0.0-linux-x86_64 && \
51 echo '7bee349a626281fc8b8d04a7a0b0358492712377400ab12533aeb39c2eb2b901 /usr/local/bin/bazel' | sha256sum --check && \
Lorenz Brunc452a8d2020-04-20 14:09:39 +020052 chmod +x /usr/local/bin/bazel
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020053
54# Use a shared Go module cache for gazelle
55# https://github.com/bazelbuild/bazel-gazelle/pull/535
56ENV GO_REPOSITORY_USE_HOST_CACHE=1
57
Serge Bazanskie7bb94c2021-07-02 17:11:58 +020058# Install ibazel (bazel-watcher)
59RUN set -e -x ;\
60 cd /tmp ;\
61 git clone -b v0.15.10 https://github.com/bazelbuild/bazel-watcher ;\
62 cd bazel-watcher ;\
63 [ $(git rev-parse HEAD) == "84cab6f15f64850fb972ea88701e634c8b611301" ] ;\
64 bazel --output_user_root /tmp/bazel-watcher-cache build //ibazel ;\
65 cp bazel-bin/ibazel/linux_amd64_stripped/ibazel /usr/local/bin/ibazel ;\
66 cd /tmp ;\
67 rm -rf bazel-watcher bazel-watcher-cache
68
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020069# --userns=keep-id uses the workdir as $HOME otherwise
70RUN mkdir /user
71ENV HOME=/user
72
73WORKDIR /work