[ROSAENG-973] chore: change Dockerfile to use harden images#947
[ROSAENG-973] chore: change Dockerfile to use harden images#947feichashao wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
WalkthroughThe Dockerfile’s multi-stage build is consolidated to use a single FIPS base image ( ChangesBuilder image and package manager standardization
🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: feichashao The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
Dockerfile (1)
61-62: 💤 Low valueConsider adding
dnf clean allfor consistency.The base stage (line 10) includes
dnf clean allbut this stage omits it. While this intermediate stage doesn't affect final image size (only/outis copied), adding cleanup maintains consistency and build cache hygiene.Suggested change
# Install tools -RUN dnf --assumeyes install gawk jq tar which gzip +RUN dnf --assumeyes install gawk jq tar which gzip \ + && dnf clean all🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Dockerfile` around lines 61 - 62, The intermediate Dockerfile RUN that installs tools (the line with "RUN dnf --assumeyes install gawk jq tar which gzip") should include cleanup to match the base stage; append a cleanup command (e.g., "&& dnf clean all" and optionally "&& rm -rf /var/cache/dnf") to that RUN so cached package data is removed and the stage stays consistent with the base stage's cleanup pattern.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@Dockerfile`:
- Around line 61-62: The intermediate Dockerfile RUN that installs tools (the
line with "RUN dnf --assumeyes install gawk jq tar which gzip") should include
cleanup to match the base stage; append a cleanup command (e.g., "&& dnf clean
all" and optionally "&& rm -rf /var/cache/dnf") to that RUN so cached package
data is removed and the stage stays consistent with the base stage's cleanup
pattern.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 79537250-6ac3-4921-9fed-25e855744833
📒 Files selected for processing (1)
Dockerfile
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #947 +/- ##
=======================================
Coverage 53.99% 53.99%
=======================================
Files 82 82
Lines 6323 6323
=======================================
Hits 3414 3414
Misses 2463 2463
Partials 446 446 🚀 New features to boost your workflow:
|
|
@feichashao: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
What type of PR is this?
What this PR does / Why we need it?
Change the Dockerfile to use Red Hat Harden Images, which provides the latest upstream Go version.
When updating the Go version for backplane-cli in go.mod, the repo will need to pass CI. One CI step is to build the Dockerfile, thus we need to have the latest version for it to build.
Which Jira/Github issue(s) does this PR fix?
Special notes for your reviewer
Unit Test Coverage
Guidelines
Test coverage checks
Pre-checks (if applicable)
/label tide/merge-method-squash
Summary by CodeRabbit