LukeMathWalker / LukeMathWalker/cargo-chef

Consider offering a binary only docker image

Open
#355 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
2.7k
Forks
146
PR merge metrics
No merged PRs in 30d

Description

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

```Dockerfile
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
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the repository's existing Docker build and image-publishing configuration, then compare it with the proposed Dockerfile. Done means a minimal bin-only image publishes the cargo-chef binary at /cargo-chef and supports the demonstrated COPY --from usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, rust
Domain
build-system, devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.