-
Notifications
You must be signed in to change notification settings - Fork 19
OCPBUGS-87367: Updating ose-agent-installer-utils-container image to be consistent with ART for 5.0 #308
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?
OCPBUGS-87367: Updating ose-agent-installer-utils-container image to be consistent with ART for 5.0 #308
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,10 +1,10 @@ | ||
| 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/agent-installer-utils | ||
| 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. Avoid copying full build context into the builder stage. Line 3 uses Proposed fix-COPY . .
+COPY go.mod go.sum ./
+COPY hack/ ./hack/
+COPY tools/ ./tools/
+COPY pkg/ ./pkg/
+COPY Makefile ./As per coding guidelines, “COPY specific files, not entire context” and “No secrets in ENV, ARG, or COPY”. 🤖 Prompt for AI AgentsSource: Coding guidelines |
||
| RUN dnf install -y gcc nmstate-devel nmstate-libs && dnf clean all | ||
| RUN ./hack/build.sh | ||
|
|
||
| FROM registry.ci.openshift.org/ocp/4.22:base-rhel9 | ||
| FROM registry.ci.openshift.org/ocp/5.0:base-rhel9 | ||
| RUN dnf install -y nmstate-libs && dnf clean all | ||
| COPY --from=builder /go/src/github.com/openshift/agent-installer-utils/bin/agent-tui /usr/bin/agent-tui | ||
| LABEL io.openshift.release.operator=true | ||
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/agent-installer-utils
Length of output: 1065
Fix container policy violations in
images/Dockerfile.ocp(base image, COPY scope, USER, HEALTHCHECK)FROM registry.ci.openshift.org/...(lines 1 and 7) violates the requirement to use UBI minimal/distroless images fromcatalog.redhat.com.COPY . .(line 3) violates “COPY specific files, not entire context”.USER non-rootand noHEALTHCHECK(noUSER/HEALTHCHECKpresent in the file).🧰 Tools
🪛 Trivy (0.69.3)
[error] 1-1: Image user should not be 'root'
Specify at least 1 USER command in Dockerfile with non-root user as argument
Rule: DS-0002
Learn more
(IaC/Dockerfile)
🤖 Prompt for AI Agents
Source: Coding guidelines