-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbuild_debuggers.debian12.Dockerfile
110 lines (89 loc) · 2.6 KB
/
build_debuggers.debian12.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
# syntax=docker/dockerfile:1.5
ARG debugger_base=debian:12
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/*
#--------
# 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 -y \
python3-xmlrunner \
&& \
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/*