Skip to content

Commit

Permalink
chore(docker): patch Cargo.toml
Browse files Browse the repository at this point in the history
we don't need the benches to build the binary, so we ignored its directory
and remove the `[[bench]]` sectios from `Cargo.toml` in te docker container
  • Loading branch information
0x61nas committed Mar 1, 2024
1 parent df85b8f commit fb2e554
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ WORKDIR /app

FROM chef AS planner
COPY . .
RUN sed -i '/^\[\[bench\]\]/,/^$/d' Cargo.toml
RUN cargo chef prepare --recipe-path recipe.json

FROM chef AS builder
Expand All @@ -11,6 +12,7 @@ ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
RUN cargo chef cook --release --recipe-path recipe.json
COPY Cargo.toml .
COPY Cargo.lock .
RUN sed -i '/^\[\[bench\]\]/,/^$/d' Cargo.toml
COPY src/ src/
RUN cargo build --release --locked \
&& rm -f target/release/deps/aarty*
Expand Down

0 comments on commit fb2e554

Please sign in to comment.