-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathbuild_debuggers.el8.Dockerfile
More file actions
97 lines (78 loc) · 2.49 KB
/
build_debuggers.el8.Dockerfile
File metadata and controls
97 lines (78 loc) · 2.49 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
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
# syntax=docker/dockerfile:1.5
ARG debugger_base=almalinux:8
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, gdb
RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \
--mount=type=cache,target=/var/cache/yum,sharing=locked \
dnf install -y gcc-toolset-11 && \
echo "#!/bin/sh" > /etc/profile.d/gcc-toolset-11.sh && \
echo "" >> /etc/profile.d/gcc-toolset-11.sh && \
echo ". /opt/rh/gcc-toolset-11/enable" >> /etc/profile.d/gcc-toolset-11.sh && \
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 \
binutils \
dnf-plugin-config-manager \
epel-release \
python3-urllib3 \
&& \
dnf config-manager --set-enabled powertools && \
rm -rf /tmp/*
# 5.8 is the last published rpm for EL8
ARG rr_version="5.8.0"
RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \
--mount=type=cache,target=/var/cache/yum,sharing=locked \
dnf install -y "https://github.com/rr-debugger/rr/releases/download/${rr_version}/rr-${rr_version}-Linux-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 \
lsof \
which \
file \
iproute \
less \
psmisc \
procps-ng \
&& \
rm -rf /tmp/*