mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-08-23 22:26:49 +00:00
🌱 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:
co-authored by
Jian Qiu
parent
2bc63a3ea7
commit
d06edffaa2
@@ -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 }} \
|
||||
|
||||
@@ -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 }} \
|
||||
|
||||
@@ -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 /
|
||||
|
||||
|
||||
@@ -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 /
|
||||
|
||||
@@ -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 /
|
||||
|
||||
@@ -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 /
|
||||
|
||||
@@ -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 /
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user