-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
25 lines (22 loc) · 938 Bytes
/
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
# syntax=docker/dockerfile:1.4
# Stage 1. Check out LLVM source code and run the build.
FROM debian:12
# as builder
LABEL maintainer "ParaTools Inc."
# Install build dependencies of llvm.
# First, Update the apt's source list and include the sources of the packages.
# Improve caching too
RUN <<EOC
grep deb /etc/apt/sources.list | sed 's/^deb/deb-src /g' >> /etc/apt/sources.list
rm -f /etc/apt/apt.conf.d/docker-clean
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
EOC
ENV CCACHE_DIR=/ccache
RUN --mount=type=cache,target=/ccache/ ls -l $CCACHE_DIR
# Install compiler, cmake, git, ccache etc.
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked --mount=type=cache,target=/var/lib/apt,sharing=locked <<EOC
apt-get update
apt-get install -y --no-install-recommends ca-certificates \
build-essential cmake ccache make python3 zlib1g wget unzip git
cmake --version
EOC