forked from fuzzland/ityfuzz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
48 lines (39 loc) · 1.25 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
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 \
git \
&& 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 Cargo.lock .
COPY rust-toolchain.toml .
COPY src ./src
COPY benches ./benches
COPY tests ./tests
COPY .git ./.git
# build offchain binary
RUN cargo build --release --features "cmp dataflow evm print_txn_corpus full_trace force_cache real_balance" --no-default-features
RUN cp target/release/ityfuzz /bins/cli_offchain
# build onchain binary
RUN cargo build --release --features "cmp dataflow evm print_txn_corpus full_trace" --no-default-features
RUN cp target/release/ityfuzz /bins/cli_onchain
RUN cargo build --release --features "cmp dataflow evm print_logs" --no-default-features
RUN cp target/release/ityfuzz /bins/cli_print_logs
FROM run_environment
WORKDIR /app
COPY --from=builder /bins /bins
WORKDIR /bins
COPY tests /bins/tests
EXPOSE 8000