forked from psycopaths/jdart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
92 lines (78 loc) · 3.22 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
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
FROM ubuntu:14.04
MAINTAINER Kasper Luckow <[email protected]>
#############################################################################
# Setup base image
#############################################################################
RUN \
apt-get update -y && \
apt-get install software-properties-common -y && \
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
add-apt-repository ppa:webupd8team/java -y && \
apt-get update -y && \
apt-get install -y oracle-java8-installer \
ant \
maven \
git \
junit \
build-essential \
python \
antlr3 \
&& \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/cache/oracle-jdk8-installer
#############################################################################
# Environment
#############################################################################
# set java env
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
ENV JUNIT_HOME /usr/share/java
RUN mkdir /jdart-project
ENV JDART_DIR /jdart-project
#############################################################################
# Dependencies
#############################################################################
# Install jpf-core
WORKDIR ${JDART_DIR}
RUN git clone https://github.com/javapathfinder/jpf-core.git
# We know that rev 29 works with jdart
WORKDIR ${JDART_DIR}/jpf-core
RUN git checkout JPF-8.0
RUN ant
#Could run ant test here but it takes a long time
# Install jConstraints
WORKDIR ${JDART_DIR}
RUN git clone https://github.com/psycopaths/jconstraints.git
WORKDIR ${JDART_DIR}/jconstraints
RUN git checkout jconstraints-0.9.1
RUN mvn install
# Install Z3
WORKDIR ${JDART_DIR}
# Note that we specify a specific *release* of Z3
RUN wget https://github.com/Z3Prover/z3/releases/download/z3-4.4.1/z3-4.4.1-x64-ubuntu-14.04.zip
RUN unzip z3-4.4.1-x64-ubuntu-14.04.zip && \
rm z3-4.4.1-x64-ubuntu-14.04.zip
RUN ln -s z3-4.4.1-x64-ubuntu-14.04 z3
WORKDIR ${JDART_DIR}/z3/bin
RUN mvn install:install-file -Dfile=com.microsoft.z3.jar -DgroupId=com.microsoft -DartifactId=z3 -Dversion=4.4.1 -Dpackaging=jar
ENV LD_LIBRARY_PATH ${JDART_DIR}/z3/bin
# install jconstraints-z3
WORKDIR ${JDART_DIR}
RUN git clone https://github.com/psycopaths/jconstraints-z3.git
WORKDIR ${JDART_DIR}/jconstraints-z3
RUN git checkout jconstraints-z3-0.9.0
RUN mvn install
# Set up jpf conf and jconstraints
RUN mkdir /root/.jpf
RUN echo "jpf-core = ${JDART_DIR}/jpf-core" >> /root/.jpf/site.properties
RUN echo "jpf-jdart = ${JDART_DIR}/jdart" >> /root/.jpf/site.properties
RUN echo "extensions=\${jpf-core}" >> /root/.jpf/site.properties
RUN mkdir -p /root/.jconstraints/extensions
RUN cp ${JDART_DIR}/jconstraints-z3/target/jconstraints-z3-0.9.0.jar /root/.jconstraints/extensions
RUN cp /root/.m2/repository/com/microsoft/z3/4.4.1/z3-4.4.1.jar /root/.jconstraints/extensions/com.microsoft.z3.jar
#############################################################################
# Install JDart
#############################################################################
WORKDIR ${JDART_DIR}
RUN git clone https://github.com/psycopaths/jdart.git
WORKDIR ${JDART_DIR}/jdart
RUN ant