Skip to content

Commit d22a264

Browse files
committed
cicd: changed initial release version #minor
1 parent 475b84b commit d22a264

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

api/Dockerfile

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,26 @@
11
FROM rust:1.93-slim AS builder
22

3+
WORKDIR /app
4+
35
RUN 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

1816
RUN cargo chef prepare --recipe-path recipe.json
1917

2018
RUN --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-
2722
RUN --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

0 commit comments

Comments
 (0)