-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.ubuntu-base
More file actions
78 lines (59 loc) · 2.14 KB
/
Dockerfile.ubuntu-base
File metadata and controls
78 lines (59 loc) · 2.14 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
ARG UBUNTU_VER=22
FROM ubuntu:${UBUNTU_VER}.04 AS base
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
curl \
dpkg-dev \
g++ \
gcc \
git \
ninja-build \
software-properties-common \
wget \
zlib1g-dev
### deps for ubuntu 20.04 ###
FROM base AS deps-20
RUN curl -sSf https://apt.kitware.com/kitware-archive.sh | sh
RUN apt-get install -y cmake
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
&& echo "deb http://apt.llvm.org/focal llvm-toolchain-focal-18 main" | tee /etc/apt/sources.list.d/llvm.list
RUN apt-get install -y \
llvm-18-dev \
liblld-18-dev \
libpolly-18-dev \
clang-18
RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 100 && \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-18 100 && \
update-alternatives --install /usr/bin/llvm-strip llvm-strip /usr/bin/llvm-strip-18 100
ENV CC=/usr/bin/clang-18
ENV CXX=/usr/bin/clang++-18
### deps for ubuntu 22.04 ###
FROM base AS deps-22
RUN apt-get install -y cmake
RUN apt-get install -y \
llvm-15-dev \
liblld-15-dev \
clang-15
RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 100 && \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-15 100 && \
update-alternatives --install /usr/bin/llvm-strip llvm-strip /usr/bin/llvm-strip-15 100
ENV CC=/usr/bin/clang-15
ENV CXX=/usr/bin/clang++-15
### deps for ubuntu 24.04 ###
FROM base AS deps-24
RUN apt-get install -y cmake
RUN apt-get install -y \
llvm-18-dev \
liblld-18-dev \
libpolly-18-dev \
clang-18
RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 100 && \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-18 100 && \
update-alternatives --install /usr/bin/llvm-strip llvm-strip /usr/bin/llvm-strip-18 100
ENV CC=/usr/bin/clang-18
ENV CXX=/usr/bin/clang++-18
### cleanup
FROM deps-${UBUNTU_VER} AS clean-apt
RUN rm -rf /var/lib/apt/lists/*