Debian Codegraph @

testing/Dockerfile

raw
1 # based on https://github.com/AFLplusplus/AFLplusplus/blob/stable/Dockerfile
2
3 FROM ubuntu:20.04
4
5 SHELL ["/bin/bash", "-o", "pipefail", "-c"]
6
7 ARG DEBIAN_FRONTEND=noninteractive
8
9 ENV NO_ARCH_OPT 1
10
11 RUN apt-get update && \
12 apt-get -y install --no-install-suggests --no-install-recommends \
13 apt-transport-https \
14 apt-utils \
15 automake \
16 bash-completion \
17 bison flex \
18 build-essential \
19 ca-certificates \
20 cmake \
21 dialog \
22 git \
23 gnupg \
24 gnuplot-nox \
25 jupp \
26 less \
27 libglib2.0-dev \
28 libpixman-1-dev \
29 libsodium-dev \
30 libtool libtool-bin \
31 nano \
32 ninja-build \
33 parallel \
34 python-is-python3 \
35 python3 \
36 python3-dev \
37 python3-setuptools \
38 screen \
39 vim \
40 wget \
41 && rm -rf /var/lib/apt/lists/*
42
43 RUN echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main" >> /etc/apt/sources.list && \
44 wget -qO - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
45
46 RUN echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu focal main" >> /etc/apt/sources.list && \
47 apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 1E9377A2BA9EF27F
48
49 RUN apt-get update && apt-get full-upgrade -y && \
50 apt-get -y install --no-install-suggests --no-install-recommends \
51 clang-12 \
52 clang-tools-12 \
53 g++-10 \
54 gcc-10 \
55 gcc-10-multilib \
56 gcc-10-plugin-dev \
57 gcc-multilib \
58 gdb \
59 lcov \
60 libc++-12-dev \
61 libc++1-12 \
62 libc++abi-12-dev \
63 libc++abi1-12 \
64 libclang-12-dev \
65 libclang-common-12-dev \
66 libclang-cpp12 \
67 libclang-cpp12-dev \
68 libclang1-12 \
69 liblld-12 \
70 liblld-12-dev \
71 liblldb-12 \
72 liblldb-12-dev \
73 libllvm12 \
74 libomp-12-dev \
75 libomp5-12 \
76 lld-12 \
77 lldb-12 \
78 llvm-12 \
79 llvm-12-dev \
80 llvm-12-runtime \
81 llvm-12-tools \
82 && rm -rf /var/lib/apt/lists/*
83
84 RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 0
85 RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 0
86
87 ENV LLVM_CONFIG=llvm-config-12
88 ENV AFL_SKIP_CPUFREQ=1
89 ENV AFL_TRY_AFFINITY=1
90 ENV AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES=1
91
92 RUN git clone --depth=1 https://github.com/vanhauser-thc/afl-cov /afl-cov
93 WORKDIR /afl-cov
94 RUN make install
95
96 RUN git clone --depth=1 https://github.com/AFLplusplus/AFLplusplus /AFLplusplus
97 WORKDIR /AFLplusplus
98 RUN export CC=gcc-10 && export CXX=g++-10 && make install
99
100 RUN echo '. /etc/bash_completion' >> ~/.bashrc
101 RUN echo 'alias joe="joe --wordwrap --joe_state -nobackup"' >> ~/.bashrc
102 ENV IS_DOCKER="1"
103 ENV CMAKE_GENERATOR=Ninja