diff --git a/Dockerfile b/Dockerfile index 97b987a2..142b5f3a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.21 as builder +FROM golang:1.21@sha256:11dc65e21b82057c973c56dce4f98d35b41cbda36fbd818ba698d3c7cf9bae8c as builder WORKDIR /workspace # Copy the Go Modules manifests @@ -19,7 +19,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build -a -o manager main.go # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details -FROM registry.access.redhat.com/ubi9/ubi-minimal +FROM registry.access.redhat.com/ubi9/ubi-minimal@sha256:a340f4b9fb261a75c84666a3dccb88e193a116da3cebabaf9bcdc33609b61172 WORKDIR / COPY --from=builder /workspace/manager . USER 65532:65532 diff --git a/ci.Dockerfile b/ci.Dockerfile index 724b6a1b..8d2c270a 100644 --- a/ci.Dockerfile +++ b/ci.Dockerfile @@ -1,4 +1,4 @@ -FROM registry.access.redhat.com/ubi9/ubi-minimal +FROM registry.access.redhat.com/ubi9/ubi-minimal@sha256:a340f4b9fb261a75c84666a3dccb88e193a116da3cebabaf9bcdc33609b61172 WORKDIR / COPY bin/manager . USER 65532:65532 diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index f1b46b35..dfca9b83 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -13,4 +13,4 @@ kind: Kustomization images: - name: controller newName: quay.io/redhat-cop/namespace-configuration-operator - newTag: latest + newTag: latest@sha256:d120d6b2c5f26dbc707884381765b3578c70b1790371583b238257a5b5e2588f