-
Notifications
You must be signed in to change notification settings - Fork 2
add Dockerfile #32
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
base: main
Are you sure you want to change the base?
add Dockerfile #32
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,15 @@ | ||||||||
| FROM rust:latest | ||||||||
|
||||||||
| FROM rust:latest | |
| FROM rust:nightly |
Copilot
AI
Feb 28, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rust:latest base image already sets RUSTUP_HOME, CARGO_HOME, and PATH to exactly these values. Re-declaring them here is redundant and could mislead maintainers into thinking these values are being changed or are not already set by the base image.
| ENV RUSTUP_HOME=/usr/local/rustup \ | |
| CARGO_HOME=/usr/local/cargo \ | |
| PATH=/usr/local/cargo/bin:$PATH |
Copilot
AI
Feb 28, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This Dockerfile performs git clone https://github.com/intentee/poet.git . followed by make, pulling and executing remote code at build time without pinning it to an immutable commit or verifying its integrity. If the GitHub repository or its default branch is compromised, any subsequent image build will transparently incorporate and execute attacker-controlled code, potentially leading to a malicious image or build-time code execution. To reduce supply chain risk, fetch only first-party source from the build context or pin the dependency to a specific trusted commit or release and verify its integrity before building.
Copilot
AI
Feb 28, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The final image contains the entire Rust toolchain, all downloaded crate sources, and build artifacts, which will result in a very large image (typically several gigabytes). Since the poet binary is the only runtime artifact needed, a multi-stage build should be used: one stage to compile the binary (using the rust base image) and a second, minimal stage (e.g., debian:bookworm-slim or scratch) to copy just the compiled binary into a much smaller runtime image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
rust:latestas the base image is non-deterministic. Thelatesttag can change at any time, meaning two builds at different times may produce different results. This also means the image may silently break if a new version of Rust introduces breaking changes. Pin the base image to a specific version (e.g.,rust:1.86orrust:1.86-slim) to ensure reproducible builds.