LukeMathWalker / LukeMathWalker/cargo-chef
Consider offering a binary only docker image
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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