From 2784d75c79c52ce1b9a1ce15234b97c6574484db Mon Sep 17 00:00:00 2001 From: Kristi Date: Fri, 25 Apr 2025 18:44:50 +0200 Subject: [PATCH] Fix #147: partially fix the container image for podlet by changing the base stage to a debian distroless. At least that will respect slashes in the image name Signed-off-by: Kristi --- Containerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Containerfile b/Containerfile index d0881ec..cfa2e9e 100644 --- a/Containerfile +++ b/Containerfile @@ -7,9 +7,9 @@ ARG TARGETPLATFORM RUN case "$TARGETPLATFORM" in \ "linux/amd64") echo x86_64-unknown-linux-musl > /rust_target.txt ;; \ "linux/arm64/v8") echo aarch64-unknown-linux-musl > /rust_target.txt && \ - apt update && apt install -y gcc-aarch64-linux-gnu ;; \ + apt update && apt install -y gcc-aarch64-linux-gnu ;; \ *) exit 1 ;; \ -esac + esac RUN rustup target add $(cat /rust_target.txt) FROM chef AS planner @@ -20,17 +20,17 @@ RUN cargo chef prepare --recipe-path recipe.json FROM chef AS builder COPY --from=planner /app/recipe.json recipe.json RUN cargo chef cook \ ---profile dist \ ---target $(cat /rust_target.txt) \ ---recipe-path recipe.json + --profile dist \ + --target $(cat /rust_target.txt) \ + --recipe-path recipe.json COPY Cargo.toml Cargo.lock ./ COPY src ./src RUN cargo build \ ---profile dist \ ---target $(cat /rust_target.txt) + --profile dist \ + --target $(cat /rust_target.txt) RUN cp target/$(cat /rust_target.txt)/dist/podlet . -FROM scratch +FROM gcr.io/distroless/static-debian12:debug-nonroot LABEL org.opencontainers.image.source="https://github.com/containers/podlet" LABEL org.opencontainers.image.description="Generate Podman Quadlet files from a Podman command, compose file, or existing object" LABEL org.opencontainers.image.licenses="MPL-2.0"