-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbuild_debuggers.rocky9.Dockerfile
113 lines (92 loc) · 3.61 KB
/
build_debuggers.rocky9.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
# syntax=docker/dockerfile:1.5
ARG debugger_base=rockylinux:9
FROM ${debugger_base}
SHELL [ "/usr/bin/bash", "-c" ]
# Make sure we're starting with an up-to-date image
RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \
--mount=type=cache,target=/var/cache/yum,sharing=locked \
dnf update -y || [ "$?" -eq 100 ] && \
rm -rf /tmp/*
ARG parallelism=3
ARG tools_prefix=/opt/debug_tools
RUN mkdir -p ${tools_prefix}
WORKDIR /tmp
#--------
# valgrind
RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \
--mount=type=cache,target=/var/cache/yum,sharing=locked \
dnf install -y valgrind && \
rm -rf /tmp/*
#--------
# gdb
RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \
--mount=type=cache,target=/var/cache/yum,sharing=locked \
dnf install -y \
gdb \
gdb-gdbserver \
&& \
rm -rf /tmp/*
#--------
# lldb
RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \
--mount=type=cache,target=/var/cache/yum,sharing=locked \
dnf install -y lldb && \
rm -rf /tmp/*
#--------
# rr
RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \
--mount=type=cache,target=/var/cache/yum,sharing=locked \
dnf install -y \
python3-urllib3 \
binutils \
epel-release \
&& \
rm -rf /tmp/*
# The rr package from github is built for EL8.
# Due to package dependencies, it can't be installed on EL9.
# The package from Fedora 38 is very close. We can use it if we update libstdc++ and glibc.
RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \
--mount=type=cache,target=/var/cache/yum,sharing=locked \
dnf install -y \
"https://archives.fedoraproject.org/pub/archive/fedora/linux/updates/38/Everything/x86_64/Packages/g/glibc-2.37-19.fc38.x86_64.rpm" \
"https://archives.fedoraproject.org/pub/archive/fedora/linux/updates/38/Everything/x86_64/Packages/g/glibc-2.37-19.fc38.i686.rpm" \
"https://archives.fedoraproject.org/pub/archive/fedora/linux/updates/38/Everything/x86_64/Packages/g/glibc-common-2.37-19.fc38.x86_64.rpm" \
"https://archives.fedoraproject.org/pub/archive/fedora/linux/updates/38/Everything/x86_64/Packages/g/glibc-minimal-langpack-2.37-19.fc38.x86_64.rpm" \
"https://archives.fedoraproject.org/pub/archive/fedora/linux/updates/38/Everything/x86_64/Packages/g/glibc-devel-2.37-19.fc38.x86_64.rpm" \
"https://archives.fedoraproject.org/pub/archive/fedora/linux/updates/38/Everything/x86_64/Packages/g/glibc-headers-x86-2.37-19.fc38.noarch.rpm" \
"https://archives.fedoraproject.org/pub/archive/fedora/linux/updates/38/Everything/x86_64/Packages/l/libstdc++-13.2.1-7.fc38.x86_64.rpm" \
&& \
dnf install -y \
"https://archives.fedoraproject.org/pub/archive/fedora/linux/updates/38/Everything/x86_64/Packages/r/rr-5.7.0-9.fc38.x86_64.rpm" \
&& \
rm -rf /tmp/*
#--------
# xmlrunner
RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \
--mount=type=cache,target=/var/cache/yum,sharing=locked \
dnf install -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 \
python3 -m pip install \
unittest-xml-reporting \
&& \
rm -rf /tmp/*
#--------
# utils
RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \
--mount=type=cache,target=/var/cache/yum,sharing=locked \
dnf install -y \
sudo \
nano \
vim-enhanced \
tmux \
lsof \
which \
file \
iproute \
&& \
rm -rf /tmp/*