Update hermes docker base runner #2776
Merged
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.
Summary
Update the Hermes Docker base image from rust:1.82.0 to debian:bookworm-slim.
Rationale
The current base image rust:1.82.0 has known vulnerabilities, as listed on Docker Hub:
https://hub.docker.com/layers/library/rust/1.82.0/images/sha256-fc4cf6c302df3a3cb211027605fd61447cac29d873692041bd21d22c55b5b459
To improve security and reduce image size, we're switching to bookworm-slim as the base image and installing only the necessary Rust toolchain manually.
How has this been tested?
Current tests cover my changes
Added new tests
Manually tested the code
Built the image locally
Ran the Hermes service inside the container to ensure correct behavior
Verified that the Rust toolchain installs and builds correctly on bookworm-slim