-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
51 lines (47 loc) · 1.35 KB
/
Dockerfile
File metadata and controls
51 lines (47 loc) · 1.35 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
FROM ubuntu:24.04
# Add the pinning configuration file
COPY apt_pins /etc/apt/preferences.d/build_tools_pins
# No longer need "ARG TARGETARCH"
# Install all packages, create symlinks, and clean up in a single layer
RUN apt-get update && \
apt-get install -y --no-install-recommends \
software-properties-common \
build-essential \
wget \
bzip2 \
iproute2 \
libncurses-dev \
libncurses6 \
rpcbind \
git \
strace \
python3-pip \
python3.12 \
cmake \
clang-18 \
valgrind \
libc6-dbg && \
#
# Configure symlinks
#
rm -f /usr/bin/python3 && \
ln -s python3.12 /usr/bin/python3 && \
#
# Create architecture-specific symlink for libc.a
#
BUILD_ARCH=$(dpkg --print-architecture) && \
case ${BUILD_ARCH} in \
"amd64") \
ln -s -f /usr/lib/x86_64-linux-gnu/libc.a /usr/lib/x86_64-linux-gnu/liblibc.a ;; \
"arm64") \
ln -s -f /usr/lib/aarch64-linux-gnu/libc.a /usr/lib/aarch64-linux-gnu/liblibc.a ;; \
*) \
echo "Unsupported architecture: ${BUILD_ARCH}" && exit 1 ;; \
esac && \
#
# Clean up apt cache
#
rm -rf /var/lib/apt/lists/*
# Allow grader to find clang binary
RUN ln -s /usr/bin/clang-18 /usr/bin/clang || true
RUN ln -s /usr/bin/clang++-18 /usr/bin/clang++ || true