From 90833a46dd90ee3df8f624b69b0aab3174c80cdb Mon Sep 17 00:00:00 2001 From: "Jose F. Rives Lirola" Date: Tue, 7 Oct 2025 21:05:27 +0200 Subject: [PATCH 1/2] feat: Add Docker image --- Dockerfile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..330eab0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +# Build stage +FROM rust:1.87 AS builder + +WORKDIR /app + +# Copy manifests +COPY Cargo.toml Cargo.lock ./ +COPY rustfmt.toml ./ + +# Copy source code +COPY src ./src +COPY examples ./examples + +# Build the application with CLI features +RUN cargo build --release --features cli + +# Runtime stage - Debian 12 distroless +FROM gcr.io/distroless/cc-debian12:nonroot + +# Copy the binary from builder +COPY --from=builder /app/target/release/kickstart /usr/local/bin/kickstart + +# Set the entrypoint +ENTRYPOINT ["/usr/local/bin/kickstart"] From f80381376f6300c62051d81d9f0ff336014f9f96 Mon Sep 17 00:00:00 2001 From: "Jose F. Rives Lirola" Date: Tue, 7 Oct 2025 21:48:19 +0200 Subject: [PATCH 2/2] fix: Dockerfile change the base image to Debian 12 slim with git, because distroless does not include git that is a requirement for kickstart --- Dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 330eab0..3a234ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,8 +14,13 @@ COPY examples ./examples # Build the application with CLI features RUN cargo build --release --features cli -# Runtime stage - Debian 12 distroless -FROM gcr.io/distroless/cc-debian12:nonroot +# Runtime stage - Debian 12 slim +FROM debian:12-slim + +# Install ca-certificates +RUN apt-get update && \ + apt-get install -y ca-certificates git && \ + rm -rf /var/lib/apt/lists/* # Copy the binary from builder COPY --from=builder /app/target/release/kickstart /usr/local/bin/kickstart