Skip to content

Fix #147 #148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down