blob: 8cf71464d3983ccdf9b49dba30a14656e1b44aa9 [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 \
Serge Bazanski5aa494f2021-05-18 18:57:10 +020033 openssl-devel \
34 java-11-openjdk
35
36# Create CI build user. This is not used by scripts/bin/bazel, but instead only
37# used by CI infrastructure to run build agents as.
38# The newly created user will have a UID of 500, and a corresponding CI group
39# of GID 500 will be created as well. This UID:GID pair's numeric values are
40# relied on by the CI infrastructure and must not change without coordination.
41RUN set -e -x ;\
42 useradd -u 500 -U -m -d /home/ci ci
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020043
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020044# Install Bazel binary
45RUN curl -o /usr/local/bin/bazel \
Lorenz Brun2073ce32021-02-03 18:52:59 +010046 https://releases.bazel.build/4.0.0/release/bazel-4.0.0-linux-x86_64 && \
47 echo '7bee349a626281fc8b8d04a7a0b0358492712377400ab12533aeb39c2eb2b901 /usr/local/bin/bazel' | sha256sum --check && \
Lorenz Brunc452a8d2020-04-20 14:09:39 +020048 chmod +x /usr/local/bin/bazel
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020049
50# Use a shared Go module cache for gazelle
51# https://github.com/bazelbuild/bazel-gazelle/pull/535
52ENV GO_REPOSITORY_USE_HOST_CACHE=1
53
Serge Bazanskie7bb94c2021-07-02 17:11:58 +020054# Install ibazel (bazel-watcher)
55RUN set -e -x ;\
56 cd /tmp ;\
57 git clone -b v0.15.10 https://github.com/bazelbuild/bazel-watcher ;\
58 cd bazel-watcher ;\
59 [ $(git rev-parse HEAD) == "84cab6f15f64850fb972ea88701e634c8b611301" ] ;\
60 bazel --output_user_root /tmp/bazel-watcher-cache build //ibazel ;\
61 cp bazel-bin/ibazel/linux_amd64_stripped/ibazel /usr/local/bin/ibazel ;\
62 cd /tmp ;\
63 rm -rf bazel-watcher bazel-watcher-cache
64
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020065# --userns=keep-id uses the workdir as $HOME otherwise
66RUN mkdir /user
67ENV HOME=/user
68
69WORKDIR /work