🌱 chore: update base image to distroless (#1556)

* chore: update base image to distroless

Reduces attack surface of the image and increase CVE maintainability

Signed-off-by: Jian Qiu <jqiu@redhat.com>

* fix: set default for `SKIP_IMAGE_BUILD`

Signed-off-by: Dale Haiducek <19750917+dhaiducek@users.noreply.github.com>

---------

Signed-off-by: Jian Qiu <jqiu@redhat.com>
Signed-off-by: Dale Haiducek <19750917+dhaiducek@users.noreply.github.com>
Co-authored-by: Jian Qiu <jqiu@redhat.com>
This commit is contained in:
Dale Haiducek
2026-06-12 17:36:28 +00:00
committed by GitHub
co-authored by Jian Qiu
parent 2bc63a3ea7
commit d06edffaa2
8 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ jobs:
- name: install imagebuilder
run: go install github.com/openshift/imagebuilder/cmd/imagebuilder@v1.2.3
- name: pull base image
run: docker pull registry.access.redhat.com/ubi9/ubi-minimal:latest --platform=linux/${{ matrix.arch }}
run: docker pull registry.access.redhat.com/ubi9/ubi-micro:latest --platform=linux/${{ matrix.arch }}
- name: images
run: |
IMAGE_TAG=latest-${{ matrix.arch }} \
+1 -1
View File
@@ -61,7 +61,7 @@ jobs:
- name: install imagebuilder
run: go install github.com/openshift/imagebuilder/cmd/imagebuilder@v1.2.3
- name: pull base image
run: docker pull registry.access.redhat.com/ubi9/ubi-minimal:latest --platform=linux/${{ matrix.arch }}
run: docker pull registry.access.redhat.com/ubi9/ubi-micro:latest --platform=linux/${{ matrix.arch }}
- name: images
run: |
IMAGE_TAG=${{ needs.env.outputs.RELEASE_VERSION }}-${{ matrix.arch }} \
+1 -1
View File
@@ -10,7 +10,7 @@ RUN GOOS=${OS} \
GO_BUILD_PACKAGES=./cmd/addon \
make build --warn-undefined-variables
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
FROM registry.access.redhat.com/ubi9/ubi-micro:latest
ENV USER_UID=10001
COPY --from=builder /go/src/open-cluster-management.io/ocm/addon /
+1 -1
View File
@@ -10,7 +10,7 @@ RUN GOOS=${OS} \
GO_BUILD_PACKAGES=./cmd/placement \
make build --warn-undefined-variables
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
FROM registry.access.redhat.com/ubi9/ubi-micro:latest
ENV USER_UID=10001
COPY --from=builder /go/src/open-cluster-management.io/ocm/placement /
+1 -1
View File
@@ -15,7 +15,7 @@ RUN GOOS=${OS} \
GO_BUILD_PACKAGES=./cmd/server \
make build --warn-undefined-variables
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
FROM registry.access.redhat.com/ubi9/ubi-micro:latest
ENV USER_UID=10001
COPY --from=builder /go/src/open-cluster-management.io/ocm/registration /
+1 -1
View File
@@ -10,7 +10,7 @@ RUN GOOS=${OS} \
GO_BUILD_PACKAGES=./cmd/registration-operator \
make build --warn-undefined-variables
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
FROM registry.access.redhat.com/ubi9/ubi-micro:latest
ENV USER_UID=10001
COPY --from=builder /go/src/open-cluster-management.io/ocm/registration-operator /
+1 -1
View File
@@ -10,7 +10,7 @@ RUN GOOS=${OS} \
GO_BUILD_PACKAGES=./cmd/work \
make build --warn-undefined-variables
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
FROM registry.access.redhat.com/ubi9/ubi-micro:latest
ENV USER_UID=10001
COPY --from=builder /go/src/open-cluster-management.io/ocm/work /
+1
View File
@@ -64,6 +64,7 @@ apply-hub-cr:
# E2E test target
# Set SKIP_IMAGE_BUILD=true to skip image building and loading (useful when only test code changes)
SKIP_IMAGE_BUILD?=false
ifeq ($(SKIP_IMAGE_BUILD),true)
test-e2e: deploy-hub deploy-spoke-operator-helm run-e2e
else