-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (23 loc) · 822 Bytes
/
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
FROM rust:1.76-bullseye AS chef
RUN cargo install cargo-chef
WORKDIR /app
FROM chef AS planner
COPY . .
RUN cargo chef prepare --recipe-path recipe.json
FROM chef AS builder
COPY --from=planner /app/recipe.json recipe.json
ARG BUILD_PROFILE=release
ENV BUILD_PROFILE ${BUILD_PROFILE}
ARG FEATURES=""
ENV FEATURES ${FEATURES}
RUN apt-get update && apt-get -y upgrade && apt-get install -y libclang-dev pkg-config
RUN cargo chef cook --profile ${BUILD_PROFILE} --features "$FEATURES" --recipe-path recipe.json
COPY . .
RUN cargo build --profile ${BUILD_PROFILE} --features "$FEATURES" --locked --bin mev
RUN cp /app/target/${BUILD_PROFILE}/mev /app/mev
FROM debian:bullseye-slim
WORKDIR /app
EXPOSE 18550
EXPOSE 28545
COPY --from=builder /app/target/release/mev /usr/local/bin
ENTRYPOINT [ "/usr/local/bin/mev" ]