forked from yuntongzhang/vulnfix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (35 loc) · 1.49 KB
/
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
FROM ubuntu:18.04
RUN apt clean
RUN apt update
RUN DEBIAN_FRONTEND=noninteractive apt install -y build-essential curl wget software-properties-common llvm
# add this for installing latest version of python3.8
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt update
# install elfutils
RUN DEBIAN_FRONTEND=noninteractive apt install -y unzip pkg-config zlib1g zlib1g-dev autoconf libtool cmake
WORKDIR /root
RUN curl -o elfutils-0.185.tar.bz2 https://sourceware.org/elfutils/ftp/0.185/elfutils-0.185.tar.bz2
RUN tar -xf elfutils-0.185.tar.bz2
WORKDIR /root/elfutils-0.185/
RUN ./configure --disable-debuginfod --disable-libdebuginfod
RUN make
RUN make install
# install other libraries
RUN DEBIAN_FRONTEND=noninteractive apt install -y git vim python3-pip gdb \
default-jdk m4 xxd clang flex bison autopoint gperf texinfo libjpeg-dev \
nasm libass-dev libmp3lame-dev dh-autoreconf unzip libopus-dev \
libtheora-dev libvorbis-dev rsync python3-dev python-dev
RUN DEBIAN_FRONTEND=noninteractive apt install -y clang-10
# install python3.8 and the libraries we need
RUN DEBIAN_FRONTEND=noninteractive apt install -y python3.8
RUN python3.8 -m pip install toml pyparsing z3-solver libclang
RUN python3 -m pip install toml pyparsing
# build the project
COPY . /home/yuntong/vulnfix/
WORKDIR /home/yuntong/vulnfix/
RUN git submodule init
RUN git submodule update
# build is slow within docker build, so just build inside container
RUN ./build.sh
ENV PATH="/home/yuntong/vulnfix/bin:${PATH}"
ENTRYPOINT /bin/bash