From 418f105bd82e57f3e16318d3670f871f2688d1cf Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Thu, 25 Apr 2024 21:01:44 -0600 Subject: [PATCH] update dockerfile so build works --- Dockerfile | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index a0465fb0..83d7cb6e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.67-bullseye AS chef +FROM rust:1.76-bullseye AS chef RUN cargo install cargo-chef WORKDIR /app @@ -8,13 +8,24 @@ RUN cargo chef prepare --recipe-path recipe.json FROM chef AS builder COPY --from=planner /app/recipe.json recipe.json -RUN cargo chef cook --release --recipe-path recipe.json + +ARG BUILD_PROFILE=release +ENV BUILD_PROFILE ${BUILD_PROFILE} + +RUN apt-get update && apt-get -y upgrade && apt-get install -y libclang-dev pkg-config + +RUN cargo chef cook --profile ${BUILD_PROFILE} --recipe-path recipe.json + COPY . . -RUN cargo build --release +RUN cargo build --profile ${BUILD_PROFILE} --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" ]