-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
45 lines (40 loc) · 1.79 KB
/
Dockerfile.dev
File metadata and controls
45 lines (40 loc) · 1.79 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
FROM ubuntu:22.04
# Minimal dev image for reproducible builds (CMake, Ninja, musl toolchain)
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
cmake \
ninja-build \
wget \
gnupg \
lsb-release \
clang \
llvm \
gcc-multilib \
musl-tools \
pkg-config \
libssl-dev \
ca-certificates \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /work
CMD ["/bin/bash"]
# Note: For JIT smoke tests, a ClangREPL (clang-repl) binary is required in the image.
# You can install a compatible Clang/LLVM build in the image if you plan to run the JIT smoke tests inside the container.
# Best-effort: install clang-repl if available from the distro repos (may require LLVM 16+)
RUN set -eux; \
# Add LLVM apt repository for a specific toolchain (16) to reliably provide clang-repl
wget -qO - https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor -o /usr/share/keyrings/llvm-archive-keyring.gpg; \
echo "deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/$(lsb_release -sc)/ llvm-toolchain-16 main" > /etc/apt/sources.list.d/llvm.list; \
apt-get update; \
# Try to install clang-16 and clang-repl-16 from the LLVM toolchain packages
if apt-cache show clang-16 >/dev/null 2>&1 || apt-cache show clang-repl-16 >/dev/null 2>&1; then \
DEBIAN_FRONTEND=noninteractive apt-get install -y clang-16 clang-repl-16 || true; \
fi; \
# Fallback: attempt to install generic clang-repl if present in repos
if apt-cache show clang-repl >/dev/null 2>&1; then \
DEBIAN_FRONTEND=noninteractive apt-get install -y clang-repl; \
else \
echo "clang-repl not available in apt repos; to run JIT smoke tests install clang-repl (LLVM 16+) manually in the image"; \
fi; \
rm -rf /var/lib/apt/lists/*