forked from secure-software-engineering/phasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created dockerfile and successfully built a docker image for phasar
- Loading branch information
Showing
11 changed files
with
141 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
./docker | ||
./docker | ||
./build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM ubuntu:latest | ||
|
||
LABEL Name=phasar Version=1.0.0 | ||
|
||
RUN apt-get -y update && apt-get install -y | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
RUN apt-get install bash sudo -y | ||
ADD ./InitializeEnvironment.sh /usr/src/phasar/ | ||
ADD ./InstallAptDependencies.sh /usr/src/phasar/ | ||
RUN sudo apt-get install libz3-4 z3 -y | ||
|
||
WORKDIR /usr/src/phasar | ||
RUN ./InitializeEnvironment.sh | ||
RUN ./InstallAptDependencies.sh | ||
RUN sudo apt-get install libboost-all-dev -y | ||
|
||
COPY . /usr/src/phasar | ||
|
||
RUN ./bootstrap_docker.sh | ||
|
||
ENTRYPOINT [ "./build/phasar" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
# copied from "https://stackoverflow.com/questions/44331836/apt-get-install-tzdata-noninteractive" | ||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime | ||
apt-get install -y tzdata | ||
dpkg-reconfigure --frontend noninteractive tzdata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
#sudo apt-get update | ||
sudo apt-get install git make cmake -y | ||
#echo "-------------------------------------------" | ||
#git --version | ||
#echo "-------------------------------------------" | ||
sudo apt-get install zlib1g-dev sqlite3 libsqlite3-dev libmysqlcppconn-dev bear python3 doxygen graphviz python python-dev python3-pip python-pip libxml2 libxml2-dev libncurses5-dev libncursesw5-dev swig build-essential g++ cmake libz3-dev libedit-dev python-sphinx libomp-dev libcurl4-openssl-dev -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
set -e | ||
|
||
NUM_THREADS=$(nproc) | ||
|
||
|
||
sudo pip install Pygments | ||
sudo pip install pyyaml | ||
sudo apt-get install libboost-all-dev | ||
|
||
#verify installation | ||
BOOST_VERSION=$(echo -e '#include <boost/version.hpp>\nBOOST_LIB_VERSION' | gcc -s -x c++ -E - 2>/dev/null| grep "^[^#;]" | tr -d '\"') | ||
if [ -z $BOOST_VERSION ] ;then | ||
echo "Failed installing boost $DESIRED_BOOST_VERSION" | ||
exit 1 | ||
else | ||
echo "Successfully installed boost v${BOOST_VERSION//_/.}" | ||
fi | ||
|
||
|
||
|
||
|
||
# installing LLVM | ||
./utils/install-llvm-8.0.0.sh $NUM_THREADS ./utils/ | ||
# installing wllvm | ||
sudo pip3 install wllvm | ||
|
||
echo "dependencies successfully installed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
echo "Hello, World" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
NUM_THREADS=$(nproc) | ||
|
||
|
||
sudo pip install Pygments | ||
sudo pip install pyyaml | ||
# installing boost | ||
#wget https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz | ||
#tar xvf boost_1_66_0.tar.gz | ||
#cd boost_1_66_0/ | ||
#./bootstrap.sh | ||
#sudo ./b2 install | ||
#cd .. | ||
|
||
|
||
# installing LLVM | ||
./utils/install-llvm-8.0.0.sh $NUM_THREADS ./utils/ | ||
# installing wllvm | ||
sudo pip3 install wllvm | ||
|
||
echo "dependencies successfully installed" | ||
echo "build phasar..." | ||
|
||
#git submodule init | ||
#git submodule update | ||
|
||
export CC=/usr/local/bin/clang | ||
export CXX=/usr/local/bin/clang++ | ||
|
||
mkdir -p build | ||
cd build | ||
cmake -DCMAKE_BUILD_TYPE=Release .. | ||
make -j $NUM_THREADS | ||
echo "phasar successfully built" | ||
echo "install phasar..." | ||
sudo make install | ||
sudo ldconfig | ||
cd .. | ||
echo "phasar successfully installed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: '2.1' | ||
|
||
services: | ||
phasar: | ||
image: phasar | ||
build: | ||
context: . | ||
dockerfile: Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: '2.1' | ||
|
||
services: | ||
phasar: | ||
image: phasar | ||
build: . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters