From 22a93f99f7d36e6ce2c742e5dc2956795b323965 Mon Sep 17 00:00:00 2001 From: daimond113 <72147841+daimond113@users.noreply.github.com> Date: Sun, 5 May 2024 21:31:21 +0200 Subject: [PATCH] chore: make registry image weigh less --- Dockerfile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index d979d09..c6dfa85 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,15 @@ -FROM rust:1.76 +FROM rust:1.77-bookworm AS builder COPY . . WORKDIR /registry -RUN cargo install --path . +RUN cargo build --release -CMD ["pesde-registry"] \ No newline at end of file +FROM debian:bookworm-slim + +COPY --from=builder /target/release/pesde-registry /usr/local/bin/ + +RUN apt-get update && apt-get install -y ca-certificates + +CMD ["/usr/local/bin/pesde-registry"]