| Lorenz Brun | 942f5e2 | 2022-01-27 15:03:10 +0100 | [diff] [blame] | 1 | FROM fedora:35 | 
| 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 \ | 
| Lorenz Brun | 942f5e2 | 2022-01-27 15:03:10 +0100 | [diff] [blame] | 8 | 	clang \ | 
| Lorenz Brun | 605efbe | 2021-09-28 14:01:01 +0200 | [diff] [blame] | 9 | 	lld \ | 
| Hendrik Hofstadt | 0d7c91e | 2019-10-23 21:44:47 +0200 | [diff] [blame] | 10 | 	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 Hofstadt | 3e6018f | 2019-10-28 21:29:42 +0100 | [diff] [blame] | 29 | 	qemu-system-x86-core \ | 
| Leopold Schabel | a4516f9 | 2019-12-04 20:27:05 +0000 | [diff] [blame] | 30 | 	expect \ | 
 | 31 | 	grpc-cli \ | 
| Serge Bazanski | 7a1b10c | 2020-02-11 10:02:21 +0100 | [diff] [blame] | 32 | 	nc \ | 
| Lorenz Brun | fd16651 | 2020-04-01 17:29:45 +0200 | [diff] [blame] | 33 | 	python-unversioned-command \ | 
| Leopold Schabel | d32d1ea | 2021-11-02 00:06:07 +0100 | [diff] [blame] | 34 | 	openssl-devel \ | 
| Leopold Schabel | 9a6cc56 | 2022-05-25 13:13:40 +0200 | [diff] [blame] | 35 | 	java-11-openjdk-headless \ | 
| Leopold | ea0a2c8 | 2022-06-30 19:49:18 +0200 | [diff] [blame] | 36 | 	dotnet-runtime-5.0 \ | 
 | 37 | 	jq \ | 
| Leopold Schabel | 9a6cc56 | 2022-05-25 13:13:40 +0200 | [diff] [blame] | 38 | 	tini | 
| Leopold Schabel | d32d1ea | 2021-11-02 00:06:07 +0100 | [diff] [blame] | 39 |  | 
 | 40 |  | 
| Leopold Schabel | 9a6cc56 | 2022-05-25 13:13:40 +0200 | [diff] [blame] | 41 | # (java-11-openjdk-headless and tini are required for the Jenkins CI agent) | 
| Leopold | ea0a2c8 | 2022-06-30 19:49:18 +0200 | [diff] [blame] | 42 | # (dotnet-runtime-5.0 and jq are required for the GitHub Actions runner) | 
| Serge Bazanski | 5aa494f | 2021-05-18 18:57:10 +0200 | [diff] [blame] | 43 |  | 
 | 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. | 
 | 49 | RUN set -e -x ;\ | 
 | 50 | 	useradd -u 500 -U -m -d /home/ci ci | 
| Hendrik Hofstadt | 0d7c91e | 2019-10-23 21:44:47 +0200 | [diff] [blame] | 51 |  | 
| Hendrik Hofstadt | 0d7c91e | 2019-10-23 21:44:47 +0200 | [diff] [blame] | 52 | # Install Bazel binary | 
 | 53 | RUN curl -o /usr/local/bin/bazel \ | 
| Lorenz Brun | d23365d | 2022-03-30 14:15:12 +0200 | [diff] [blame] | 54 | 	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 Brun | c452a8d | 2020-04-20 14:09:39 +0200 | [diff] [blame] | 56 | 	chmod +x /usr/local/bin/bazel | 
| Hendrik Hofstadt | 0d7c91e | 2019-10-23 21:44:47 +0200 | [diff] [blame] | 57 |  | 
 | 58 | # Use a shared Go module cache for gazelle | 
 | 59 | # https://github.com/bazelbuild/bazel-gazelle/pull/535 | 
 | 60 | ENV GO_REPOSITORY_USE_HOST_CACHE=1 | 
 | 61 |  | 
| Serge Bazanski | e7bb94c | 2021-07-02 17:11:58 +0200 | [diff] [blame] | 62 | # Install ibazel (bazel-watcher) | 
 | 63 | RUN 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 Hofstadt | 0d7c91e | 2019-10-23 21:44:47 +0200 | [diff] [blame] | 73 | # --userns=keep-id uses the workdir as $HOME otherwise | 
 | 74 | RUN mkdir /user | 
 | 75 | ENV HOME=/user | 
 | 76 |  | 
 | 77 | WORKDIR /work |