Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

Commit

Permalink
Upgrade Docker Base Image And Fix URLs in Image (#105)
Browse files Browse the repository at this point in the history
- use the rolling ubuntu image as base
- no longer install go manually
- skip benchmark data
- uses the current directory to build the image
- uses workdir for nicer commands
  • Loading branch information
gitu authored and inian committed Jun 11, 2017
1 parent 3cacff7 commit 76f9186
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
1 change: 1 addition & 0 deletions .dockerignore
@@ -0,0 +1 @@
.idea/
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -8,3 +8,4 @@ contract_data
*.disasm
*.report
.DS_Store
.idea/
20 changes: 14 additions & 6 deletions Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:16.04
FROM ubuntu:rolling

MAINTAINER Hrishi Olickel (hrishioa@gmail.com)

Expand All @@ -7,9 +7,17 @@ RUN apt-get update
RUN apt-get install -y wget unzip python-virtualenv git build-essential software-properties-common
RUN add-apt-repository -y ppa:ethereum/ethereum-dev
RUN add-apt-repository -y ppa:ethereum/ethereum
RUN apt-get install -y build-essential golang
RUN curl -O https://storage.googleapis.com/golang/go1.7.3.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.7.3.linux-amd64.tar.gz && mkdir -p ~/go; echo "export GOPATH=$HOME/go" >> ~/.bashrc && echo "export PATH=$PATH:$HOME/go/bin:/usr/local/go/bin" >> ~/.bashrc && source ~/.bashrc
RUN git clone https://github.com/ethereum/go-ethereum && cd go-ethereum && make all && cd build/bin && echo "PATH=$PATH:$(pwd)" >> ~/.bashrc && source ~/.bashrc
RUN apt-get update
RUN apt-get install -y solc
RUN cd /home/ && mkdir oyente && cd oyente && mkdir dependencies && cd dependencies && wget https://github.com/Z3Prover/z3/archive/z3-4.4.1.zip && unzip z3-4.4.1.zip && rm *.zip && virtualenv venv && source venv/bin/activate && pip install tqdm && cd z3-z3-4.4.1 && python scripts/mk_make.py && cd build && make && make install && cd /home/oyente && git clone https://github.com/ethereum/oyente && cd oyente && wget https://github.com/oyente/oyente/raw/master/benchmark/contract_data.zip -O contract_data.zip && unzip contract_data.zip && wget https://raw.githubusercontent.com/ethereum/dapp-bin/master/getting%20started/greeter.sol -O greeter.sol && python oyente.py greeter.sol
RUN apt-get install -y build-essential golang-go solc ethereum python python-pip
RUN pip install requests web3

RUN mkdir -p /deps/z3/ && wget https://github.com/Z3Prover/z3/archive/z3-4.5.0.zip -O /deps/z3/z3.zip && \
cd /deps/z3/ && unzip /deps/z3/z3.zip && \
ls /deps/z3 && mv /deps/z3/z3-z3-4.5.0/* /deps/z3/ && rm /deps/z3/z3.zip && \
python scripts/mk_make.py --python && cd build && make && make install


COPY . /oyente/
WORKDIR /oyente/

CMD python oyente.py -ru https://gist.githubusercontent.com/loiluu/d0eb34d473e421df12b38c12a7423a61/raw/2415b3fb782f5d286777e0bcebc57812ce3786da/puzzle.sol

0 comments on commit 76f9186

Please sign in to comment.