forked from secure-software-engineering/phasar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
44 lines (32 loc) · 1.24 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
44
FROM ubuntu:20.04
ARG LLVM_INSTALL_DIR="/usr/local/llvm-12"
LABEL Name=phasar Version=1.0.0
RUN apt -y update && apt install bash sudo -y
WORKDIR /usr/src/phasar
RUN mkdir -p /usr/src/phasar/utils
COPY ./utils/InitializeEnvironment.sh /usr/src/phasar/utils/
RUN ./utils/InitializeEnvironment.sh
COPY ./utils/InstallAptDependencies.sh /usr/src/phasar/utils/
RUN ./utils/InstallAptDependencies.sh
RUN pip3 install Pygments pyyaml
# installing boost
RUN apt install libboost-all-dev -y
# installing LLVM
COPY utils/safeCommandsSet.sh /usr/src/phasar/utils/safeCommandsSet.sh
COPY utils/install-llvm.sh /usr/src/phasar/utils/install-llvm.sh
RUN ./utils/install-llvm.sh $(nproc) . ${LLVM_INSTALL_DIR} "llvmorg-12.0.0"
# installing wllvm
RUN pip3 install wllvm
ENV CC=${LLVM_INSTALL_DIR}/bin/clang
ENV CXX=${LLVM_INSTALL_DIR}/bin/clang++
ENV LD_LIBRARY_PATH=${LLVM_INSTALL_DIR}/lib:$LD_LIBRARY_PATH
COPY . /usr/src/phasar
RUN git submodule init
RUN git submodule update
RUN mkdir -p build && \
cd build && \
cmake -DCMAKE_BUILD_TYPE=Release .. && \
make -j $(nproc) && \
make install && \
ldconfig
ENTRYPOINT [ "./build/tools/phasar-llvm/phasar-llvm" ]