File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11FROM rust:1.93-slim AS builder
22
3+ WORKDIR /app
4+
35RUN apt-get update && apt-get install -y \
46 pkg-config \
57 libssl-dev \
68 ca-certificates \
79 build-essential \
810 && rm -rf /var/lib/apt/lists/*
911
10- RUN cargo install cargo-chef sccache --locked
11-
12- ENV RUSTC_WRAPPER=sccache
13-
14- WORKDIR /app
12+ RUN cargo install cargo-chef --locked
1513
16- COPY Cargo.toml Cargo.lock ./
14+ COPY . .
1715
1816RUN cargo chef prepare --recipe-path recipe.json
1917
2018RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked \
2119 --mount=type=cache,target=/usr/local/cargo/git,sharing=locked \
22- --mount=type=cache,target=$SCCACHE_DIR,sharing=locked \
2320 cargo chef cook --release --recipe-path recipe.json
2421
25- COPY . .
26-
2722RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked \
2823 --mount=type=cache,target=/usr/local/cargo/git,sharing=locked \
29- --mount=type=cache,target=$SCCACHE_DIR,sharing=locked \
3024 cargo build --release --bin api
3125
3226
You can’t perform that action at this time.
0 commit comments