Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci-operator.yaml
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.24-openshift-4.22
tag: rhel-9-release-golang-1.26-openshift-5.0
4 changes: 2 additions & 2 deletions Dockerfile.openshift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This dockerfile is specific to building the network metrics daemon for OpenShift
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.24-openshift-4.22 AS builder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.26-openshift-5.0 AS builder

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use approved production base images per policy (Line 2, Line 16).

Both stages currently use registry.ci.openshift.org/... images, but policy requires UBI minimal or distroless images from catalog.redhat.com. Please switch both FROM lines to compliant Red Hat catalog images.

As per coding guidelines, "**/{Dockerfile,Containerfile}*: Base image: UBI minimal or distroless from catalog.redhat.com".

Also applies to: 16-16

🤖 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.openshift` at line 2, Replace the non-compliant CI base images
used in the two FROM directives with Red Hat catalog images (UBI minimal or
distroless from catalog.redhat.com); specifically update the first FROM that
defines the builder stage (the line starting with "FROM ... AS builder") and the
second FROM used for the final stage to use approved images such as
catalog.redhat.com/ubi9/ubi-minimal:<appropriate-tag> or a catalog.redhat.com
distroless equivalent, ensuring both FROM lines no longer reference
registry.ci.openshift.org and that the chosen tags match your supported Red Hat
UBI/distroless version.

Source: Coding guidelines


# Add everything
ENV PKG_NAME=github.com/openshift/network-metrics-daemon
Expand All @@ -13,7 +13,7 @@ RUN make build-bin

WORKDIR /

FROM registry.ci.openshift.org/ocp/4.22:base-rhel9-minimal
FROM registry.ci.openshift.org/ocp/5.0:base-rhel9
COPY --from=builder /go/src/github.com/openshift/network-metrics-daemon/bin/network-metrics-daemon /usr/bin/network-metrics

LABEL io.k8s.display-name="Network Metrics Daemon" \
Expand Down