-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbuild_debuggers.ubuntu24.Dockerfile
129 lines (105 loc) · 3.11 KB
/
build_debuggers.ubuntu24.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
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# syntax=docker/dockerfile:1.5
ARG debugger_base=ubuntu:24.04
FROM ${debugger_base}
SHELL [ "/bin/bash", "-c" ]
ENV DEBIAN_FRONTEND=noninteractive
# Re-enable apt caching for RUN --mount
RUN rm -f /etc/apt/apt.conf.d/docker-clean && \
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
# Make sure we're starting with an up-to-date image
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && \
apt-get upgrade -y && \
apt-get autoremove -y --purge && \
rm -rf /tmp/*
# To mark all installed packages as manually installed:
#apt-mark showauto | xargs -r apt-mark manual
ARG parallelism=3
ARG tools_prefix=/opt/debug_tools
RUN mkdir -p ${tools_prefix}
WORKDIR /tmp
#--------
# gdb
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && \
apt-get install -y \
gdb \
gdbserver \
&& \
apt-get remove -y python3-dev && \
rm -rf /tmp/*
#--------
# rr
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && \
apt-get install -y \
python3-urllib3 \
binutils \
wget \
&& \
rm -rf /tmp/*
ARG rr_version="5.7.0"
RUN wget "https://github.com/rr-debugger/rr/releases/download/${rr_version}/rr-${rr_version}-Linux-x86_64.deb" && \
apt-get install -y "./rr-${rr_version}-Linux-x86_64.deb" && \
rm -rf /tmp/*
#--------
# valgrind
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && \
apt-get install -y \
valgrind \
&& \
rm -rf /tmp/*
#--------
# lldb
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && \
apt-get install -y \
lldb \
&& \
rm -rf /tmp/*
#--------
# catchsegv
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && \
apt-get install -y \
glibc-tools \
&& \
rm -rf /tmp/*
#--------
# xmlrunner
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && \
apt-get install --no-install-recommends -y \
python3-pip \
python3-lxml \
&& \
rm -rf /tmp/*
RUN --mount=type=cache,target=/root/.cache/pip,sharing=locked \
--mount=type=cache,target=/root/.cache/wheel,sharing=locked \
pip3 install --break-system-packages \
unittest-xml-reporting \
&& \
rm -rf /tmp/*
#--------
# utils
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && \
apt-get install -y \
tmux \
vim \
nano \
tig \
coreutils \
python3-pexpect \
iproute2 \
&& \
rm -rf /tmp/*