Skip to content

Commit

Permalink
use maxperf profile for Docker build by default
Browse files Browse the repository at this point in the history
  • Loading branch information
ralexstokes committed May 13, 2024
1 parent 3888cef commit 07e72be
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.76-bullseye AS chef
FROM rust:1.77-bullseye AS chef
RUN cargo install cargo-chef
WORKDIR /app

Expand All @@ -9,7 +9,7 @@ RUN cargo chef prepare --recipe-path recipe.json
FROM chef AS builder
COPY --from=planner /app/recipe.json recipe.json

ARG BUILD_PROFILE=release
ARG BUILD_PROFILE=maxperf
ENV BUILD_PROFILE ${BUILD_PROFILE}
ARG FEATURES=""
ENV FEATURES ${FEATURES}
Expand All @@ -19,7 +19,9 @@ RUN apt-get update && apt-get -y upgrade && apt-get install -y libclang-dev pkg-
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
ARG RUSTFLAGS="-C target-cpu=native"
ENV RUSTFLAGS "$RUSTFLAGS"
RUN RUSTFLAGS="$RUSTFLAGS" cargo build --profile ${BUILD_PROFILE} --features "$FEATURES" --locked --bin mev

RUN cp /app/target/${BUILD_PROFILE}/mev /app/mev

Expand Down

0 comments on commit 07e72be

Please sign in to comment.