forked from fuzzland/ityfuzz
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
60 lines (46 loc) · 1.33 KB
/
Dockerfile
File metadata and controls
60 lines (46 loc) · 1.33 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
FROM rust:buster as run_environment
RUN apt-get update && apt-get install -y \
curl \
jq \
python3 \
python3-pip \
python3-setuptools \
python3-wheel \
python3-venv libz3-dev libssl-dev \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install --upgrade pip
RUN mkdir /bins
FROM run_environment as build_environment
RUN apt-get update && apt-get install -y clang pkg-config cmake \
&& rm -rf /var/lib/apt/lists/*
FROM build_environment as builder
WORKDIR /builder
COPY Cargo.toml .
COPY rust-toolchain.toml .
COPY src ./src
COPY cli ./cli
COPY benches ./benches
COPY externals ./externals
# build offchain binary
WORKDIR /builder/cli
RUN cargo build --release
RUN cp target/release/cli /bins/cli_offchain
# build onchain binary
RUN sed -i -e 's/"cmp"/"cmp","flashloan_v2"/g' ../Cargo.toml
RUN cargo build --release
RUN cp target/release/cli /bins/cli_onchain
RUN sed -i -e 's/"deployer_is_attacker"/"print_logs"/g' ../Cargo.toml
RUN sed -i -e 's/"print_txn_corpus",//g' ../Cargo.toml
RUN sed -i -e 's/"full_trace",//g' ../Cargo.toml
RUN cargo build --release
RUN cp target/release/cli /bins/cli_print_logs
FROM run_environment
WORKDIR /app
COPY --from=builder /bins /bins
COPY ui /app/ui
RUN pip3 install -r ui/requirements.txt
RUN pip3 install solc-select
COPY ui/start.sh .
RUN chmod +x start.sh
EXPOSE 8000
CMD ./start.sh