blob: e31902613aa35e46f3ec13e4ed5f604b76e2e3f4 [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++ \
7 libuuid-devel \
8 python3 \
9 nasm \
10 acpica-tools \
11 gettext-devel \
12 autoconf \
13 bison \
14 libtool \
15 automake \
16 flex \
17 glibc-static \
18 elfutils-libelf-devel \
19 libblkid-devel \
20 lz4 \
21 bc \
22 hostname \
23 which \
24 swtpm-tools \
25 rsync \
Hendrik Hofstadt3e6018f2019-10-28 21:29:42 +010026 qemu-system-x86-core \
Leopold Schabela4516f92019-12-04 20:27:05 +000027 expect \
28 grpc-cli \
Serge Bazanski7a1b10c2020-02-11 10:02:21 +010029 nc \
Lorenz Brunfd166512020-04-01 17:29:45 +020030 python-unversioned-command \
Serge Bazanski5aa494f2021-05-18 18:57:10 +020031 openssl-devel \
32 java-11-openjdk
33
34# Create CI build user. This is not used by scripts/bin/bazel, but instead only
35# used by CI infrastructure to run build agents as.
36# The newly created user will have a UID of 500, and a corresponding CI group
37# of GID 500 will be created as well. This UID:GID pair's numeric values are
38# relied on by the CI infrastructure and must not change without coordination.
39RUN set -e -x ;\
40 useradd -u 500 -U -m -d /home/ci ci
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020041
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020042# Install Bazel binary
43RUN curl -o /usr/local/bin/bazel \
Lorenz Brun2073ce32021-02-03 18:52:59 +010044 https://releases.bazel.build/4.0.0/release/bazel-4.0.0-linux-x86_64 && \
45 echo '7bee349a626281fc8b8d04a7a0b0358492712377400ab12533aeb39c2eb2b901 /usr/local/bin/bazel' | sha256sum --check && \
Lorenz Brunc452a8d2020-04-20 14:09:39 +020046 chmod +x /usr/local/bin/bazel
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020047
48# Use a shared Go module cache for gazelle
49# https://github.com/bazelbuild/bazel-gazelle/pull/535
50ENV GO_REPOSITORY_USE_HOST_CACHE=1
51
52# --userns=keep-id uses the workdir as $HOME otherwise
53RUN mkdir /user
54ENV HOME=/user
55
56WORKDIR /work