Skip to content

Commit fded8c8

Browse files
author
Dejan Jovanovic
committed
[docker] update and simplify docker script to download latest cvc4,z3,boogie
1 parent 4b8ee7a commit fded8c8

File tree

2 files changed

+46
-29
lines changed

2 files changed

+46
-29
lines changed

docker/Dockerfile-solcverify.src

+45-28
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,52 @@
1-
FROM ubuntu:bionic
1+
FROM ubuntu:focal
22

33
# Generic packages
4-
RUN apt update && apt install software-properties-common unzip git python3-pip wget sudo -y
4+
RUN apt update && DEBIAN_FRONTEND="noninteractive" apt install -y \
5+
cmake \
6+
curl \
7+
git \
8+
libboost-filesystem-dev \
9+
libboost-program-options-dev \
10+
libboost-system-dev \
11+
libboost-test-dev \
12+
python3-pip \
13+
software-properties-common \
14+
unzip \
15+
wget
516

6-
# CVC4
7-
RUN wget http://cvc4.cs.stanford.edu/downloads/builds/x86_64-linux-opt/cvc4-1.7-x86_64-linux-opt \
8-
&& chmod a+x cvc4-1.7-x86_64-linux-opt \
9-
&& cp cvc4-1.7-x86_64-linux-opt /usr/local/bin/cvc4
10-
11-
# .NET Core runtime (for Boogie)
12-
RUN wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
13-
&& dpkg -i packages-microsoft-prod.deb \
14-
&& add-apt-repository universe \
15-
&& apt-get update \
16-
&& apt-get install apt-transport-https -y \
17-
&& apt-get update \
18-
&& apt-get install dotnet-runtime-3.1 -y
19-
20-
# Boogie
21-
RUN wget https://github.com/boogie-org/boogie/releases/download/v2.6.5/Boogie.2.6.5.nupkg \
22-
&& unzip Boogie.2.6.5.nupkg -d Boogie
23-
24-
# solc-verify
17+
# Python dependencies
2518
RUN pip3 install psutil
19+
20+
# CVC4
21+
RUN curl --silent "https://api.github.com/repos/CVC4/CVC4/releases/latest" | grep browser_download_url | grep -E 'linux' | cut -d '"' -f 4 | wget -qi - -O /usr/local/bin/cvc4 \
22+
&& chmod a+x /usr/local/bin/cvc4
23+
24+
# Z3
25+
RUN curl --silent "https://api.github.com/repos/Z3Prover/z3/releases/latest" | grep browser_download_url | grep -E 'ubuntu' | cut -d '"' -f 4 | wget -qi - -O z3.zip \
26+
&& unzip -p z3.zip '*bin/z3' > /usr/local/bin/z3 \
27+
&& chmod a+x /usr/local/bin/z3
28+
29+
# Get .NET
30+
RUN wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
31+
&& dpkg -i packages-microsoft-prod.deb \
32+
&& apt update \
33+
&& apt install -y apt-transport-https \
34+
&& apt update \
35+
&& apt install -y dotnet-sdk-3.1
36+
37+
# Get boogie
38+
RUN dotnet tool install --global boogie
39+
ENV PATH="${PATH}:/root/.dotnet/tools"
40+
41+
# Get and compile solc-verify
2642
RUN git clone https://github.com/SRI-CSL/solidity.git \
27-
&& cd solidity \
28-
&& ./scripts/install_deps.sh \
29-
&& mkdir -p build \
30-
&& cd build \
31-
&& cmake -DBOOGIE_BIN="/Boogie/tools/netcoreapp3.1/any/" .. \
32-
&& make \
33-
&& make install
43+
&& cd solidity \
44+
&& git checkout boogie \
45+
&& mkdir -p build \
46+
&& cd build \
47+
&& cmake .. -DUSE_Z3=Off -DUSE_CVC4=Off \
48+
&& make \
49+
&& make install
3450

51+
# Set entrypoint
3552
ENTRYPOINT ["solc-verify.py"]

docker/runsv.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ DIR=`dirname $ABSPATH`
77
FILE=/host/`basename $ABSPATH`
88
shift
99

10-
docker run -it --mount type=bind,source="$DIR",target=/host solc-verify:latest $FILE $@
10+
docker run -it --rm --mount type=bind,source="$DIR",target=/host solc-verify:latest $FILE $@

0 commit comments

Comments
 (0)