Repository navigation
Expand file tree
/
Copy pathDockerfile.centos8
More file actions
97 lines (85 loc) · 3.3 KB
/
Copy pathDockerfile.centos8
File metadata and controls
97 lines (85 loc) · 3.3 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
FROM quay.io/centos/centos:stream8 AS deps
# CentOS Stream 8 vault mirrors - use archive.kernel.org fallback
RUN set -eux \
&& sed -i 's|mirror.centos.org/\$contentdir/\$stream|archive.kernel.org/centos-vault/centos/8-stream|g' /etc/yum.repos.d/CentOS-*.repo \
&& sed -i 's|vault.centos.org/centos/\$contentdir/\$stream|archive.kernel.org/centos-vault/centos/8-stream|g' /etc/yum.repos.d/CentOS-*.repo \
&& sed -i 's|^mirrorlist=|#mirrorlist=|g' /etc/yum.repos.d/CentOS-*.repo \
&& sed -i 's|^#baseurl=http|baseurl=http|g' /etc/yum.repos.d/CentOS-*.repo
# General dependencies
RUN set -eux \
&& dnf install --assumeyes \
ca-certificates \
curl \
gdb \
git \
gnupg
# Development dependencies
RUN set -eux \
&& dnf install --assumeyes dnf-plugins-core epel-release \
&& dnf config-manager --set-enabled powertools \
&& dnf install --assumeyes \
clang \
cmake \
libcurl-devel \
lld \
llvm \
llvm-devel \
python3-devel \
python3-pip \
python3-setuptools \
zlib-devel \
libselinux-devel
# Additional development dependencies
# Install Doxygen and Graphviz from CentOS Stream 8 PowerTools
RUN set -eux \
&& dnf config-manager --add-repo=https://archive.kernel.org/centos-vault/centos/8-stream/PowerTools/x86_64/os/ \
&& dnf config-manager --setopt='archive.kernel.org_centos-vault_centos_8-stream_PowerTools_x86_64_os_.gpgcheck=1' --setopt='archive.kernel.org_centos-vault_centos_8-stream_PowerTools_x86_64_os_.gpgkey=https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official' --save \
&& dnf install --assumeyes \
doxygen \
graphviz \
&& dnf config-manager --disable archive.kernel.org_centos-vault_centos_8-stream_PowerTools_x86_64_os_
# ENV -ldl: AFL++ compiler-rt calls dlsym; VMF CMake links it, but persist for downstream builds on glibc < 2.34.
ENV LDFLAGS="-ldl"
FROM deps AS aflpp
# AFL++ build dependencies
RUN set -eux \
&& dnf install --assumeyes \
automake \
cpio \
glib2-devel \
flex \
bison \
cargo
# Clone and build firejail
RUN git clone --depth 1 https://github.com/netblue30/firejail.git /usr/local/src/firejail\
&& cd /usr/local/src/firejail \
&& ./configure --prefix=/usr --enable-selinux \
&& make \
&& make install-strip
# Clone and build AFL++
RUN set -eux \
&& cd /usr/local/src \
&& git clone --depth 1 -b v5.00c https://github.com/AFLplusplus/AFLplusplus.git \
&& cd AFLplusplus \
&& make all \
&& make install \
&& command -v afl-cc \
&& command -v afl-fuzz \
&& command -v afl-showmap \
&& afl-cc --version \
&& afl-cc --help
FROM aflpp AS vmf
# Clone, build, install VMF
# -ldl: AFL++ compiler-rt (__afl_bug_configure_runtime) calls dlsym; glibc < 2.34 requires libdl (merged into libc ≥ 2.34).
RUN set -eux \
&& cd /usr/local/src \
&& mkdir vmf \
&& git clone --depth 1 https://github.com/draperlaboratory/vadermodularfuzzer.git vmf \
&& cd vmf \
&& mkdir -p build \
&& cd build \
&& cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. \
&& make -j \
&& make install \
&& command -v vader
RUN echo "Deprecation notice: VMF example support for this distribution is ending; migrate to a supported platform."