build pipeline finished
This commit is contained in:
25
Dockerfile
25
Dockerfile
@ -1,11 +1,28 @@
|
||||
FROM rust:1.76.0
|
||||
|
||||
FROM lukemathwalker/cargo-chef:latest-rust-1.76.0-bookworm as chef
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt update && apt install lld clang -y
|
||||
|
||||
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 . .
|
||||
ENV SQLX_OFFLINE true
|
||||
RUN cargo build --release
|
||||
|
||||
|
||||
FROM debian:bookworm-slim AS runner
|
||||
WORKDIR /app
|
||||
RUN apt-get update -y \
|
||||
&& apt-get install -y --no-install-recommends openssl ca-certificates \
|
||||
&& apt-get autoremove -y \
|
||||
&& apt-get clean -y \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
COPY --from=builder /app/target/release/zero2prod zero2prod
|
||||
COPY configuration configuration
|
||||
ENV APP_ENVIRONMENT production
|
||||
|
||||
ENTRYPOINT ["./target/release/zero2prod"]
|
||||
ENTRYPOINT ["./zero2prod"]
|
||||
|
||||
Reference in New Issue
Block a user