-
Notifications
You must be signed in to change notification settings - Fork 101
OCPBUGS-87454: Updating ose-cluster-samples-operator-container image to be consistent with ART for 5.0 #700
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?
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 |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| build_root_image: | ||
| name: release | ||
| namespace: openshift | ||
| tag: rhel-9-release-golang-1.25-openshift-4.22 | ||
| tag: rhel-9-release-golang-1.26-openshift-5.0 |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,9 +1,9 @@ | ||||||||||||||
| FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 AS builder | ||||||||||||||
| FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.26-openshift-5.0 AS builder | ||||||||||||||
| WORKDIR /go/src/github.com/openshift/cluster-samples-operator | ||||||||||||||
| COPY . . | ||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win Avoid copying entire build context. Line 3 copies the entire repository context ( 🔒 Proposed fix to copy specific files-COPY . .
+COPY go.mod go.sum ./
+COPY cmd/ cmd/
+COPY pkg/ pkg/
+COPY vendor/ vendor/
+COPY Makefile ./Note: Adjust the paths based on what 📝 Committable suggestion
Suggested change
🤖 Prompt for AI AgentsSource: Coding guidelines |
||||||||||||||
| RUN make build | ||||||||||||||
|
|
||||||||||||||
| FROM registry.ci.openshift.org/ocp/4.22:base-rhel9 | ||||||||||||||
| FROM registry.ci.openshift.org/ocp/5.0:base-rhel9 | ||||||||||||||
| COPY --from=builder /go/src/github.com/openshift/cluster-samples-operator/cluster-samples-operator /usr/bin/ | ||||||||||||||
| RUN ln -f /usr/bin/cluster-samples-operator /usr/bin/cluster-samples-operator-watch | ||||||||||||||
| COPY manifests/image-references manifests/0* /manifests/ | ||||||||||||||
|
|
||||||||||||||
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.
🧩 Analysis chain
🏁 Script executed:
Repository: openshift/cluster-samples-operator
Length of output: 335
🏁 Script executed:
Repository: openshift/cluster-samples-operator
Length of output: 384
🏁 Script executed:
Repository: openshift/cluster-samples-operator
Length of output: 184
🏁 Script executed:
Repository: openshift/cluster-samples-operator
Length of output: 6477
Fix Docker base-image/security guideline violations in Dockerfile(s)
registry.ci.openshift.org(notcatalog.redhat.com) and the runtime image is not UBI minimal/distroless (Dockerfile:FROM registry.ci.openshift.org/ocp/5.0:base-rhel9;Dockerfile.okd/Dockerfile.rhel7: final stage usesFROM .../ocp/builder:rhel-*-base-openshift-*).COPY . .) inDockerfile,Dockerfile.okd, andDockerfile.rhel7(guideline requires copying specific files).HEALTHCHECKinstruction exists in anyDockerfile*(Dockerfile,Dockerfile.okd,Dockerfile.rhel7).USER cluster-samples-operator).Source: Coding guidelines