1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2025-05-18 12:02:53 +02:00

build(deps): update latest

This commit is contained in:
Divlo
2022-12-30 00:55:21 +01:00
parent a04240c0ab
commit 9e751c53d9
43 changed files with 4728 additions and 1423 deletions

View File

@ -0,0 +1 @@
/target

View File

@ -1,7 +1,16 @@
FROM rust:1.64.0
FROM rust:1.66.0 AS builder
WORKDIR /usr/src/rust_application
WORKDIR /usr/app
COPY ./ /usr/app
RUN rustc -C debuginfo=0 -C opt-level=3 -C target-cpu=native solution.rs
# Cache dependencies
RUN cargo init --bin ./
COPY ./Cargo.* ./
RUN cargo build --release && rm --recursive --force ./src ./target/release/deps/rust_application*
CMD ["./solution"]
# Build application
COPY ./ ./
RUN cargo build --release
FROM gcr.io/distroless/cc-debian11:latest AS runner
WORKDIR /usr/src/rust_application
COPY --from=builder /usr/src/rust_application/target/release/rust_application ./
CMD ["./rust_application"]