Skip to content

Commit 2784d75

Browse files
author
Kristi
committed
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 <kristi@uni-bonn.de>
1 parent 7f2c9c4 commit 2784d75

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Containerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ ARG TARGETPLATFORM
77
RUN case "$TARGETPLATFORM" in \
88
"linux/amd64") echo x86_64-unknown-linux-musl > /rust_target.txt ;; \
99
"linux/arm64/v8") echo aarch64-unknown-linux-musl > /rust_target.txt && \
10-
apt update && apt install -y gcc-aarch64-linux-gnu ;; \
10+
apt update && apt install -y gcc-aarch64-linux-gnu ;; \
1111
*) exit 1 ;; \
12-
esac
12+
esac
1313
RUN rustup target add $(cat /rust_target.txt)
1414

1515
FROM chef AS planner
@@ -20,17 +20,17 @@ RUN cargo chef prepare --recipe-path recipe.json
2020
FROM chef AS builder
2121
COPY --from=planner /app/recipe.json recipe.json
2222
RUN cargo chef cook \
23-
--profile dist \
24-
--target $(cat /rust_target.txt) \
25-
--recipe-path recipe.json
23+
--profile dist \
24+
--target $(cat /rust_target.txt) \
25+
--recipe-path recipe.json
2626
COPY Cargo.toml Cargo.lock ./
2727
COPY src ./src
2828
RUN cargo build \
29-
--profile dist \
30-
--target $(cat /rust_target.txt)
29+
--profile dist \
30+
--target $(cat /rust_target.txt)
3131
RUN cp target/$(cat /rust_target.txt)/dist/podlet .
3232

33-
FROM scratch
33+
FROM gcr.io/distroless/static-debian12:debug-nonroot
3434
LABEL org.opencontainers.image.source="https://github.com/containers/podlet"
3535
LABEL org.opencontainers.image.description="Generate Podman Quadlet files from a Podman command, compose file, or existing object"
3636
LABEL org.opencontainers.image.licenses="MPL-2.0"

0 commit comments

Comments
 (0)