diff --git a/Dockerfile b/Dockerfile index 97b987a2..56d98d9b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.21 as builder +FROM golang:1.21@sha256:09d5b5ed55381a79eebe0a52816e6730853c37b105052803a6cc6ff96ecf770f 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:582e18f13291d7c686ec4e6e92d20b24c62ae0fc72767c46f30a69b1a6198055 WORKDIR / COPY --from=builder /workspace/manager . USER 65532:65532 diff --git a/ci.Dockerfile b/ci.Dockerfile index 724b6a1b..980b656f 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:582e18f13291d7c686ec4e6e92d20b24c62ae0fc72767c46f30a69b1a6198055 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