forked from foxglove/mcap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ci.Dockerfile
46 lines (37 loc) · 1.38 KB
/
ci.Dockerfile
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
ARG IMAGE=ubuntu:jammy
FROM $IMAGE
ARG IMAGE=ubuntu:jammy
# https://askubuntu.com/questions/909277/avoiding-user-interaction-with-tzdata-when-installing-certbot-in-a-docker-contai
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends --no-install-suggests \
ca-certificates \
curl \
cmake \
gnupg \
make \
perl \
python3 \
python3-pip \
clang \
clang-format \
&& rm -rf /var/lib/apt/lists/*
RUN if [ "$IMAGE" = "ubuntu:focal" ]; then \
echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main" >> /etc/apt/sources.list && \
curl https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
apt-get update && \
apt-get install -y --no-install-recommends --no-install-suggests \
clang-13 \
clang-format-13 \
&& rm -rf /var/lib/apt/lists/* \
; fi
RUN if [ "$IMAGE" = "ubuntu:focal" ]; then \
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-13 100; \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-13 100; \
update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-13 100; \
update-alternatives --install /usr/bin/git-clang-format git-clang-format /usr/bin/git-clang-format-13 100 \
; fi
RUN pip --no-cache-dir install conan~=1.0
WORKDIR /mcap/cpp
COPY --from=hdoc /hdoc/build/hdoc /usr/local/bin/hdoc
CMD [ "./build.sh" ]