From e4fe8a3dee6aa26eb6e06b99178604aee04f2361 Mon Sep 17 00:00:00 2001 From: Jan Fajerski Date: Tue, 25 Aug 2026 10:24:35 +0200 Subject: [PATCH] chore: add Dockerfile.art This targets the ART managed COO builds. It's a direct copy of the Dockerfile used in the team managed konflux pipeline. See also https://github.com/rhobs/konflux-coo/blob/9300f1e23d77925490be0b3db5c2f49abbb96402/Dockerfile.thanos Signed-off-by: Jan Fajerski --- Dockerfile.art | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Dockerfile.art diff --git a/Dockerfile.art b/Dockerfile.art new file mode 100644 index 0000000000..de93bf7429 --- /dev/null +++ b/Dockerfile.art @@ -0,0 +1,42 @@ +FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.26 as builder + +WORKDIR /workspace + +COPY thanos . + +ENV GOTOOLCHAIN=local +ENV CGO_ENABLED=1 +ENV GOEXPERIMENT=strictfipsruntime + +# Konflux prepends: . /cachi2/cachi2.env && … +# cachi2.env often sets GOFLAGS=-mod=mod, which makes the compiler expect module zips under the +# prefetch cache (…/pkg/mod/cache/download/*.zip) that Thanos builds hit as missing. The submodule +# ships vendor/; -mod=vendor avoids that. Pass -mod/-tags on the CLI so they override GOFLAGS. +ARG TARGETOS TARGETARCH +RUN GOOS=$TARGETOS GOARCH=$TARGETARCH go build -mod=vendor -tags=netgo,slicelabels -o /go/bin/thanos ./cmd/thanos + +FROM registry.redhat.io/ubi9/ubi-minimal:latest@sha256:8eb2830d0936237fc13a1f2f7e45aecf90d69043380ad167fad0343632937f41 +WORKDIR / + +COPY --from=builder /go/bin/thanos /bin/thanos +COPY --from=builder /workspace/LICENSE /licenses/. + +USER nobody +ENTRYPOINT [ "/bin/thanos" ] + +ARG VERSION=v0.42.4 +LABEL com.redhat.component="coo-thanos-container" \ + name="cluster-observability-operator/thanos-rhel9" \ + cpe="cpe:/a:redhat:cluster_observability_operator:1.5::el9" \ + version="${VERSION}" \ + release="${VERSION}" \ + vendor="Red Hat, Inc." \ + distribution-scope="public" \ + url="https://github.com/openshift/thanos" \ + summary="Thanos for Cluster Observability Operator" \ + io.openshift.expose-services="" \ + io.openshift.tags="monitoring" \ + io.k8s.display-name="COO Thanos" \ + io.k8s.description="Thanos extends Prometheus with highly available, scalable and unlimited metric storage." \ + maintainer="team-monitoring@redhat.com" \ + description="Thanos for Cluster Observability Operator"