From c84583ac2370f67a7200d6a64d3ed7a1004c9d30 Mon Sep 17 00:00:00 2001 From: Austin Rooks Date: Thu, 26 Sep 2024 15:15:13 -0500 Subject: [PATCH] simplify dockerfile --- Dockerfile | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5ca1a4c..f3f713b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,25 +1,11 @@ -FROM lukemathwalker/cargo-chef:latest-rust-bookworm AS chef +FROM rust:1.81 AS builder 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 . . RUN cargo build --release --bin bl0g -FROM debian:bookworm-slim AS runtime +FROM gcr.io/distroless/cc-debian12 AS runtime WORKDIR /app -RUN apt-get update -y \ - && apt-get install -y --no-install-recommends openssl ca-certificates pkg-config \ - && apt-get autoremove -y \ - && apt-get clean -y \ - && rm -rf /var/lib/apt/lists/* COPY --from=builder /app/target/release/bl0g bl0g COPY config config COPY assets assets