From a25455d598d23308a522b3744e20266d1330fb34 Mon Sep 17 00:00:00 2001 From: Google Cloud Agent for Compute Workloads Dev Date: Sun, 3 May 2026 00:36:36 -0700 Subject: [PATCH] Update operator bundle to support Red Hat certification. PiperOrigin-RevId: 909450809 --- build/Dockerfile | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index 404f322d..804f4abc 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,15 +1,31 @@ FROM ghcr.io/jqlang/jq:latest as jq +FROM registry.access.redhat.com/ubi9/ubi-minimal:latest -# Hack to create the log file so that we can redirect it later. -FROM busybox:latest as busybox -RUN touch /google-cloud-workload-agent.log +LABEL name="workload-agent" \ + vendor="Google Cloud" \ + version="0.0.1" \ + release="1" \ + summary="Google Cloud Agent for Compute Workloads" \ + description="The Agent for Compute Workloads lets you monitor and evaluate workloads running on Compute Engine. Once you install the agent on the compute instances that host your workload, the agent collects metrics from your workload and instances, and sends them to Google Cloud services. Currently, the agent only sends to Google Cloud Workload Manager where you can the evaluation service of Workload Manager to evaluate your workload against industry best practices and those recommended by Google Cloud." + maintainer="workload-agent-team@google.com" -FROM us.gcr.io/gke-release/gke-distroless/bash WORKDIR / -COPY --from=jq /jq /jq + +RUN mkdir -p /licenses +COPY LICENSE /licenses/ + +COPY --from=jq /jq /usr/local/bin/jq COPY google_cloud_workload_agent openshift-docker-entrypoint.sh ./ + +RUN mkdir -p /etc/google-cloud-workload-agent COPY default_openshift_configuration.json /etc/google-cloud-workload-agent/configuration.json -# Redirect workload agent logs to stdout so that they are visible on the host. -COPY --from=busybox /google-cloud-workload-agent.log /var/log/google-cloud-workload-agent.log -RUN ["ln", "-sf", "/dev/stdout", "/var/log/google-cloud-workload-agent.log"] + +# Run native UBI commands to setup logs +RUN touch /var/log/google-cloud-workload-agent.log && \ + ln -sf /dev/stdout /var/log/google-cloud-workload-agent.log && \ + chmod +x /openshift-docker-entrypoint.sh + +# Set a non-root user +USER 1001 + ENTRYPOINT ["/openshift-docker-entrypoint.sh"]