-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
77 lines (57 loc) · 1.88 KB
/
Dockerfile
File metadata and controls
77 lines (57 loc) · 1.88 KB
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
FROM ubuntu:bionic
RUN apt-get -y update
RUN apt-get install -y npm bash-completion sudo git
RUN useradd -m fragments
RUN usermod -aG sudo fragments
WORKDIR /home/fragments
ENV HOME /home/fragments
ENV PATH $PATH:$HOME/.local/bin
ENV LANG C.UTF-8
# Install Solidity v0.4.24
USER fragments
RUN mkdir -p /home/fragments/dependencies
WORKDIR /home/fragments/dependencies
RUN git clone https://github.com/ethereum/solidity.git
WORKDIR /home/fragments/dependencies/solidity
RUN git checkout v0.4.24
RUN git submodule update --init --recursive
USER root
RUN ./scripts/install_deps.sh
RUN ./scripts/build.sh
# BEGIN Requirements for Manticore:
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install python3 python3-pip
RUN apt-get install -y build-essential software-properties-common
USER fragments
RUN pip3 install manticore
# END Requirements for Manticore
# BEGIN Install Echidna
USER root
RUN apt-get install -y libgmp-dev libbz2-dev libreadline-dev curl software-properties-common locales-all locales libsecp256k1-dev
RUN curl -sSL https://get.haskellstack.org/ | sh
USER fragments
WORKDIR /home/fragments/dependencies
RUN git clone https://github.com/trailofbits/echidna.git
WORKDIR /home/fragments/dependencies/echidna
RUN git reset --hard d93c226b2ad4ff884f33faa850d7d36556c12211 # Using stable version
RUN stack upgrade
RUN stack setup
RUN stack install
WORKDIR /home/fragments
USER root
RUN update-locale LANG=en_US.UTF-8
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# END Install Echidna
USER fragments
COPY echidna /home/fragments/echidna/
COPY manticore /home/fragments/manticore/
COPY exec.sh /home/fragments/exec.sh
USER root
RUN chown -R fragments:fragments echidna
RUN chown -R fragments:fragments manticore
# Allow passwordless sudo for fragments
RUN echo 'fragments ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
USER fragments
CMD ["/bin/bash"]