Skip to content

Conversation

@bakhtin
Copy link
Contributor

@bakhtin bakhtin commented Nov 7, 2025

  • Set Docket image Rust version for building the binary by parsing a version configured for the project. That is to avoid manually updating Docker images when the Rust version bumps
  • Consume build artifacts directly from the Docker image that built it using --output flag. Previously, we used a separate step to create a dummy container just to copy the artifacts.
  • Replace release stage in the Docker image since we don't publish Docker images

Signed-off-by: bakhtin <a@bakhtin.net>
Signed-off-by: bakhtin <a@bakhtin.net>
Signed-off-by: bakhtin <a@bakhtin.net>
Comment on lines +62 to +72
- name: Install rust
run: |
docker build -f Dockerfile.reproducible -t flowproxy:release .
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- name: Extract binary from Docker image
- name: Build reproducible binary with Docker
run: |
# Create a temporary container and copy the binary
docker create --name temp-container flowproxy:release
docker cp temp-container:/flowproxy ./flowproxy
docker rm temp-container
RUST_TOOLCHAIN=$(rustc --version | cut -d' ' -f2)
docker build -f Dockerfile.reproducible \
--build-arg "RUST_TOOLCHAIN=${RUST_TOOLCHAIN}" \
-t flowproxy:release \
--output type=local,dest=./target .
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we fetch this from the rust-toolchain.toml file?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also GitHub runners should have rustup already installed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants