forked from 3rdparty/eventuals
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dazel
58 lines (49 loc) · 1.84 KB
/
Dockerfile.dazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# NOTE: THIS FILE SHOULD BE SPECIFIC TO EVENTUALS AND ONLY INCLUDE
# DEPENDENCIES NECESSARY FOR BUILDING AND TESTING AND NOTHING MORE! DO
# NOT SHARE THIS FILE WITH ANOTHER REPOSITORY BECAUSE THEN IT MIGHT
# BECOME DIFFICULT TO DETERMINE ONLY THOSE DEPENDENCIES NECESSARY FOR
# EVENTUALS.
# Start from Debian with Python 3.9 preinstalled since it's required
# for 'protoc-gen-eventuals'.
#
# TODO(benh): update to Python 3.10.
FROM python:3.9-slim-bullseye
ARG BAZEL_VERSION=5.1.1
ARG CLANG_VERSION=14
# Install generic dependencies.
#
# curl and gnupg are needed to install bazel.
#
# TODO(benh): are 'ca-certificates' or 'ssh-client' necessary?
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
gnupg \
git \
ssh-client \
curl \
wget
# Install build tools for some of the 3rdparty dependencies that are
# outside/foreign to Bazel.
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
make
# Install Bazel:
# https://docs.bazel.build/versions/main/install-ubuntu.html#install-on-ubuntu
RUN echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" > \
/etc/apt/sources.list.d/bazel.list \
&& curl -fsSL https://bazel.build/bazel-release.pub.gpg | apt-key add - \
&& apt-get update && apt-get install -y bazel=${BAZEL_VERSION}
# Install clang (and its dependencies).
RUN apt-get update && apt-get install -y --no-install-recommends \
lsb-release \
software-properties-common
RUN wget -O /tmp/llvm.sh "https://apt.llvm.org/llvm.sh" \
&& chmod +x /tmp/llvm.sh \
&& /tmp/llvm.sh ${CLANG_VERSION} \
&& rm /tmp/llvm.sh
# Make clang mean clang-xx.
RUN ln -s /usr/bin/clang-${CLANG_VERSION} /usr/bin/clang
# Cleanup.
RUN apt-get purge --auto-remove -y \
&& rm -rf /etc/apt/sources.list.d/bazel.list \
&& rm -rf /var/lib/apt/lists/*