Skip to content

Consider offering a binary only docker image #355

@nresare

Description

@nresare

While I understand the convenience of shipping docker images based on the upstream rust images, it does make ensuring that the right images are used in this era of supply chain attacks more difficult. Would you consider shipping a minimal docker image that only contains the cargo-chef binary, to be explicitly copied into some other potentially hardened build images provided by a third party using something like

COPY --from=LukeMathWalker/cargo-chef:bin-only /cargo-chef /bin/cargo-chef

I have experimented with the following and it seems to work

FROM rust:slim-trixie AS build

WORKDIR /build
COPY . .
RUN cargo build --release

FROM scratch
COPY --from=build /build/target/release/cargo-chef /cargo-chef

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions