Skip to content

Commit

Permalink
Remove cargo-chef in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallku committed Feb 9, 2024
1 parent 0809b36 commit 9e499e4
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
FROM rust:1.73-alpine AS chef
FROM rust:1.73-alpine AS builder

WORKDIR /usr/src/marshallku-blog-cdn

RUN set -eux; \
apk add --no-cache musl-dev pkgconfig libressl-dev; \
cargo install cargo-chef; \
rm -rf $CARGO_HOME/registry

FROM chef as planner

COPY . .
RUN cargo chef prepare --recipe-path recipe.json

FROM chef AS builder

COPY --from=planner /usr/src/marshallku-blog-cdn/recipe.json .
RUN cargo chef cook --release --recipe-path recipe.json

COPY . .
RUN cargo build --release

Expand Down

0 comments on commit 9e499e4

Please sign in to comment.