| Lorenz Brun | c452a8d | 2020-04-20 14:09:39 +0200 | [diff] [blame] | 1 | FROM fedora:32 | 
| Hendrik Hofstadt | 0d7c91e | 2019-10-23 21:44:47 +0200 | [diff] [blame] | 2 |  | 
 | 3 | RUN dnf -y upgrade && \ | 
| Lorenz Brun | fd16651 | 2020-04-01 17:29:45 +0200 | [diff] [blame] | 4 | 	dnf -y install \ | 
| Hendrik Hofstadt | 0d7c91e | 2019-10-23 21:44:47 +0200 | [diff] [blame] | 5 | 	"@Development Tools" \ | 
 | 6 | 	g++ \ | 
| Lorenz Brun | 605efbe | 2021-09-28 14:01:01 +0200 | [diff] [blame] | 7 | 	llvm \ | 
 | 8 | 	lld \ | 
| Hendrik Hofstadt | 0d7c91e | 2019-10-23 21:44:47 +0200 | [diff] [blame] | 9 | 	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 Hofstadt | 3e6018f | 2019-10-28 21:29:42 +0100 | [diff] [blame] | 28 | 	qemu-system-x86-core \ | 
| Leopold Schabel | a4516f9 | 2019-12-04 20:27:05 +0000 | [diff] [blame] | 29 | 	expect \ | 
 | 30 | 	grpc-cli \ | 
| Serge Bazanski | 7a1b10c | 2020-02-11 10:02:21 +0100 | [diff] [blame] | 31 | 	nc \ | 
| Lorenz Brun | fd16651 | 2020-04-01 17:29:45 +0200 | [diff] [blame] | 32 | 	python-unversioned-command \ | 
| Leopold Schabel | d32d1ea | 2021-11-02 00:06:07 +0100 | [diff] [blame] | 33 | 	openssl-devel \ | 
 | 34 | 	java-11-openjdk-headless | 
 | 35 |  | 
 | 36 |  | 
 | 37 | # (java-11-openjdk-headless is required for the Jenkins CI agent) | 
 | 38 |  | 
| Serge Bazanski | 5aa494f | 2021-05-18 18:57:10 +0200 | [diff] [blame] | 39 |  | 
 | 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. | 
 | 45 | RUN set -e -x ;\ | 
 | 46 | 	useradd -u 500 -U -m -d /home/ci ci | 
| Hendrik Hofstadt | 0d7c91e | 2019-10-23 21:44:47 +0200 | [diff] [blame] | 47 |  | 
| Hendrik Hofstadt | 0d7c91e | 2019-10-23 21:44:47 +0200 | [diff] [blame] | 48 | # Install Bazel binary | 
 | 49 | RUN curl -o /usr/local/bin/bazel \ | 
| Lorenz Brun | 8fda084 | 2021-11-09 19:47:51 +0100 | [diff] [blame] | 50 | 	https://releases.bazel.build/4.2.0/release/bazel-4.2.0-linux-x86_64 && \ | 
 | 51 | 	echo '643f3cdc707fc27dad3e5eb4f97ed7fa8f2a132a5477fb4ac2eae3c52d7abb65  /usr/local/bin/bazel' | sha256sum --check && \ | 
| Lorenz Brun | c452a8d | 2020-04-20 14:09:39 +0200 | [diff] [blame] | 52 | 	chmod +x /usr/local/bin/bazel | 
| Hendrik Hofstadt | 0d7c91e | 2019-10-23 21:44:47 +0200 | [diff] [blame] | 53 |  | 
 | 54 | # Use a shared Go module cache for gazelle | 
 | 55 | # https://github.com/bazelbuild/bazel-gazelle/pull/535 | 
 | 56 | ENV GO_REPOSITORY_USE_HOST_CACHE=1 | 
 | 57 |  | 
| Serge Bazanski | e7bb94c | 2021-07-02 17:11:58 +0200 | [diff] [blame] | 58 | # Install ibazel (bazel-watcher) | 
 | 59 | RUN 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 Hofstadt | 0d7c91e | 2019-10-23 21:44:47 +0200 | [diff] [blame] | 69 | # --userns=keep-id uses the workdir as $HOME otherwise | 
 | 70 | RUN mkdir /user | 
 | 71 | ENV HOME=/user | 
 | 72 |  | 
 | 73 | WORKDIR /work |