Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes the Rust base image used by the Docker build configurable via a build argument, and wires that through the GitHub Actions Docker publishing workflow so callers can choose a specific Rust image tag.
Changes:
- Parameterize
Dockerfile’sFROM rust:...with aRUST_IMAGEbuild arg (defaulting tolatest). - Add a
workflow_dispatchinput to select the Rust image tag, and pass it as a Docker build arg. - Adjust Docker tag computation so non-default Rust images get a
-rust-<image>suffix and do not update the:latesttag on version releases.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Dockerfile | Adds ARG RUST_IMAGE and uses it in the FROM line to make the Rust base image tag configurable. |
| .github/workflows/docker.yml | Adds a workflow input + env propagation for RUST_IMAGE, modifies tag computation to suffix tags when a custom Rust image is used, and passes the build arg to Buildx. |
d720221 to
8a53140
Compare
8a53140 to
a1cd5b6
Compare
a1cd5b6 to
7f37b6f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Make the Docker image self-contained and customizable. Closes #2542.
The Dockerfile is now multi-stage: the builder stage clones the requested CLI source from GitHub and runs
cargo buildagainst the target rust base image. Both stages use the samerust:${RUST_IMAGE}image, so glibc and shared libraries cannot drift between build and runtime.Two knobs are exposed to the workflow:
rust_image(defaultlatest) — pins the rust base image used for both stages. When non-default, images are tagged with a-rust-<sanitized>suffix and:latestis not updated.refflows into the Dockerfile asCLI_REFand selects which version of stellar-cli to clone and build.Anyone can now reproduce a target configuration with a single command, no workflow knowledge required:
docker build \ --build-arg RUST_IMAGE=1.90.0-slim-bookworm \ --build-arg CLI_REF=v25.1.0 \ -t stellar-cli:25.1.0-rust-1.90.0-slim-bookworm .Multi-arch builds run on native runners (
ubuntu-latestfor amd64,ubuntu-24.04-armfor arm64) and push per-arch by digest; a finalmanifestjob combines them into the tagged manifest list — no QEMU emulation in CI.Why
https://stellarfoundation.slack.com/archives/C08AP4BN24E/p1778093609993929?thread_ts=1773364869.231219&cid=C08AP4BN24E
Known limitations
N/A