From 3a8ff7b8fa352fccc46793b485915b4e2dfa7071 Mon Sep 17 00:00:00 2001 From: dusdjhyeon Date: Tue, 16 Jul 2024 10:47:11 +0900 Subject: [PATCH] feat: migration base image Signed-off-by: dusdjhyeon --- build/Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index 1c919b4c6..812b80385 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -17,13 +17,15 @@ RUN go env RUN CGO_ENABLED=0 go build -buildvcs=false -o /output/chaos-operator -v ./main.go # Packaging stage -# Image source: https://github.com/litmuschaos/test-tools/blob/master/custom/hardened-alpine/infra/Dockerfile -# The base image is non-root (have litmus user) with default litmus directory. -FROM litmuschaos/infra-alpine +FROM registry.access.redhat.com/ubi9/ubi-minimal:9.4 LABEL maintainer="LitmusChaos" ENV OPERATOR=/usr/local/bin/chaos-operator + COPY --from=builder /output/chaos-operator ${OPERATOR} +RUN chown 65534:0 ${OPERATOR} && chmod 755 ${OPERATOR} + +USER 65534 ENTRYPOINT ["/usr/local/bin/chaos-operator"]