Skip to content

Commit

Permalink
build(oci): switch builder image to ubi9 go toolset (cryostatio#997)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores authored Jan 7, 2025
1 parent 4360c30 commit 52fef0c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 19 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Build the manager binary
FROM docker.io/library/golang:1.22 as builder
FROM registry.access.redhat.com/ubi9/go-toolset:1.22.9 as builder
ARG TARGETOS
ARG TARGETARCH

WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
Expand All @@ -26,7 +25,7 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} GO111MODULE=on go

FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
WORKDIR /
COPY --from=builder /workspace/manager .
COPY --from=builder /opt/app-root/src/manager .
USER 65532:65532

ENTRYPOINT ["/manager"]
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ metadata:
capabilities: Seamless Upgrades
categories: Monitoring, Developer Tools
containerImage: quay.io/cryostat/cryostat-operator:4.0.0-dev
createdAt: "2024-12-20T16:25:35Z"
createdAt: "2025-01-07T17:50:16Z"
description: JVM monitoring and profiling tool
operatorframework.io/initialization-resource: |-
{
Expand Down
12 changes: 6 additions & 6 deletions bundle/tests/scorecard/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ stages:
- entrypoint:
- cryostat-scorecard-tests
- operator-install
image: quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20241220000429
image: quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20250107174829
labels:
suite: cryostat
test: operator-install
Expand All @@ -80,7 +80,7 @@ stages:
- entrypoint:
- cryostat-scorecard-tests
- cryostat-cr
image: quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20241220000429
image: quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20250107174829
labels:
suite: cryostat
test: cryostat-cr
Expand All @@ -90,7 +90,7 @@ stages:
- entrypoint:
- cryostat-scorecard-tests
- cryostat-multi-namespace
image: quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20241220000429
image: quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20250107174829
labels:
suite: cryostat
test: cryostat-multi-namespace
Expand All @@ -100,7 +100,7 @@ stages:
- entrypoint:
- cryostat-scorecard-tests
- cryostat-recording
image: quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20241220000429
image: quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20250107174829
labels:
suite: cryostat
test: cryostat-recording
Expand All @@ -110,7 +110,7 @@ stages:
- entrypoint:
- cryostat-scorecard-tests
- cryostat-config-change
image: quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20241220000429
image: quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20250107174829
labels:
suite: cryostat
test: cryostat-config-change
Expand All @@ -120,7 +120,7 @@ stages:
- entrypoint:
- cryostat-scorecard-tests
- cryostat-report
image: quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20241220000429
image: quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20250107174829
labels:
suite: cryostat
test: cryostat-report
Expand Down
12 changes: 6 additions & 6 deletions config/scorecard/patches/custom.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
entrypoint:
- cryostat-scorecard-tests
- operator-install
image: "quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20241220000429"
image: "quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20250107174829"
labels:
suite: cryostat
test: operator-install
Expand All @@ -18,7 +18,7 @@
entrypoint:
- cryostat-scorecard-tests
- cryostat-cr
image: "quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20241220000429"
image: "quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20250107174829"
labels:
suite: cryostat
test: cryostat-cr
Expand All @@ -28,7 +28,7 @@
entrypoint:
- cryostat-scorecard-tests
- cryostat-multi-namespace
image: "quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20241220000429"
image: "quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20250107174829"
labels:
suite: cryostat
test: cryostat-multi-namespace
Expand All @@ -38,7 +38,7 @@
entrypoint:
- cryostat-scorecard-tests
- cryostat-recording
image: "quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20241220000429"
image: "quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20250107174829"
labels:
suite: cryostat
test: cryostat-recording
Expand All @@ -48,7 +48,7 @@
entrypoint:
- cryostat-scorecard-tests
- cryostat-config-change
image: "quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20241220000429"
image: "quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20250107174829"
labels:
suite: cryostat
test: cryostat-config-change
Expand All @@ -58,7 +58,7 @@
entrypoint:
- cryostat-scorecard-tests
- cryostat-report
image: "quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20241220000429"
image: "quay.io/cryostat/cryostat-operator-scorecard:4.0.0-20250107174829"
labels:
suite: cryostat
test: cryostat-report
5 changes: 2 additions & 3 deletions internal/images/custom-scorecard-tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@
# limitations under the License.

# Build the manager binary
FROM docker.io/library/golang:1.22 as builder
FROM registry.access.redhat.com/ubi9/go-toolset:1.22.9 as builder
ARG TARGETOS
ARG TARGETARCH

WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
Expand All @@ -42,7 +41,7 @@ ENV TEST=/usr/local/bin/cryostat-scorecard-tests \

COPY internal/images/custom-scorecard-tests/bin/user_setup /usr/local/bin/
COPY internal/images/custom-scorecard-tests/bin/entrypoint /usr/local/bin/
COPY --from=builder /workspace/cryostat-scorecard-tests /usr/local/bin/
COPY --from=builder /opt/app-root/src/cryostat-scorecard-tests /usr/local/bin/
RUN /usr/local/bin/user_setup

ENTRYPOINT ["/usr/local/bin/entrypoint"]
Expand Down

0 comments on commit 52fef0c

Please sign in to comment.