-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdebian.dockerfile
138 lines (117 loc) · 3.27 KB
/
debian.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
130
131
132
133
134
135
136
137
138
FROM debian:bullseye
RUN echo 'deb-src http://deb.debian.org/debian bullseye main' >> /etc/apt/sources.list
RUN apt-get update && apt-get upgrade
RUN apt-get install -y \
vim \
build-essential \
linux-source \
bc \
kmod \
cpio \
flex \
libncurses5-dev \
libelf-dev \
libssl-dev \
dwarves \
bison
RUN apt-get build-dep -y qemu
RUN apt-get install -y \
git \
rsync \
silversearcher-ag
RUN apt-get install -y \
aptitude
RUN apt-get install -y \
git-email \
libaio-dev libbluetooth-dev libcapstone-dev libbrlapi-dev libbz2-dev \
libcap-ng-dev libcurl4-gnutls-dev libgtk-3-dev \
libibverbs-dev libncurses5-dev libnuma-dev \
librbd-dev librdmacm-dev \
libsasl2-dev libsdl2-dev libseccomp-dev libsnappy-dev libssh-dev \
libvde-dev libvdeplug-dev libvte-2.91-dev libxen-dev liblzo2-dev \
valgrind xfslibs-dev
# Pahole
RUN apt-get install -y cmake libdw-dev wget
RUN mkdir /tmpgit && \
cd /tmpgit && git clone --recurse-submodules git://git.kernel.org/pub/scm/devel/pahole/pahole.git && \
cd pahole && \
mkdir build && \
cd build && \
cmake -D__LIB=lib -DBUILD_SHARED_LIBS=OFF .. && \
make install && \
cd && \
rm -R /tmpgit
RUN apt-get install -y python3 python3-pip b4
ENV PATH="${PATH}:/opt/local/bin"
# selftests/bpf/vmtest.sh
RUN apt-get install -y curl sudo zstd
RUN apt-get install -y \
lsb-release \
software-properties-common \
apt-utils
# Do we really need this whole thing just for bpf?
RUN wget https://apt.llvm.org/llvm.sh && \
chmod +x llvm.sh && \
sudo ./llvm.sh 15 all && \
cd /usr/lib/llvm-15/bin/ && \
for f in *; do ln -sf ../lib/llvm-15/bin/$f /usr/bin/$f; done && \
cd / && \
rm ./llvm.sh
RUN apt-get install -y qemu-utils qemu-system
RUN wget https://download.qemu.org/qemu-7.2.0.tar.xz && \
tar xvJf qemu-7.2.0.tar.xz && \
cd qemu-7.2.0 && \
./configure \
--target-list="x86_64-softmmu,aarch64-softmmu,riscv64-softmmu" \
--enable-slirp \
--enable-system \
--enable-vhost-vdpa \
--enable-vduse-blk-export \
--enable-vhost-user \
--enable-vhost-net \
--enable-kvm && \
make && \
make install && \
cd .. && \
rm -R qemu-7.2.0 && \
rm qemu-7.2.0.tar.xz
RUN pip install pyelftools
RUN apt-get install -y \
fakeroot \
gcc-10-aarch64-linux-gnu \
crossbuild-essential-arm64 \
debootstrap \
busybox
# For qemu-arm-img-builder
RUN apt-get install -y \
parted \
udev
RUN apt-get install -y \
bridge-utils
RUN apt-get install -y \
--no-install-recommends \
libvirt-clients \
libvirt-daemon-system
RUN mkdir -p /etc/qemu/
RUN echo "allow all" | tee /etc/qemu/root.conf
RUN echo "include /etc/qemu/root.conf" | tee --append /etc/qemu/bridge.conf
RUN chown root:root /etc/qemu/root.conf
RUN chmod 640 /etc/qemu/root.conf
RUN mkdir -p /usr/local/etc/qemu/
RUN ln -sf /etc/qemu/bridge.conf /usr/local/etc/qemu/bridge.conf
RUN python3 -m pip install click requests
RUN python3 -m pip install --user --upgrade b4
# Install everything we need to build perf tools
RUN apt-get build-dep -y \
linux-perf
# Install Linux v6.2-rc5 headers
RUN wget "https://git.kernel.org/torvalds/t/linux-6.2-rc5.tar.gz" && \
tar xvf linux-6.2-rc5.tar.gz && \
cd linux-6.2-rc5 && \
make headers_install INSTALL_HDR_PATH=/usr && \
cd tools/perf && \
make prefix=/usr/local install && \
cd ../.. && \
cd .. && \
rm -f linux-6.2-rc5.tar.gz && \
rm -Rf linux-6.2-rc5