-
-
Notifications
You must be signed in to change notification settings - Fork 153
Expand file tree
/
Copy pathDockerfile
More file actions
21 lines (17 loc) · 763 Bytes
/
Copy pathDockerfile
File metadata and controls
21 lines (17 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM docker.io/lukemathwalker/cargo-chef:latest-rust-1.96 AS chef
WORKDIR /app
FROM chef AS planner
COPY . .
RUN cargo chef prepare --recipe-path recipe.json
FROM chef AS builder
COPY --from=planner /app/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json
COPY . .
RUN cargo build --workspace --release
FROM gcr.io/distroless/cc-debian13 AS production
COPY --from=builder /app/target/release/crawl-contests /usr/bin
COPY --from=builder /app/target/release/crawl-submissions /usr/bin
COPY --from=builder /app/target/release/crawl-standings /usr/bin
COPY --from=builder /app/target/release/crawl-problems /usr/bin
COPY --from=builder /app/target/release/dump-json /usr/bin
COPY --from=builder /app/target/release/run-server /usr/bin