Skip to content

Commit 5c105e7

Browse files
authoredAug 6, 2024··
Merge pull request #153 from dusdjhyeon/ubi-migration
UBI migration of Images - chaos-exporter
2 parents 1a156cf + 2f41e92 commit 5c105e7

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed
 

‎Dockerfile

+10-4
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,18 @@ RUN go env
1717
RUN CGO_ENABLED=0 go build -buildvcs=false -o /output/chaos-exporter -v ./cmd/exporter/
1818

1919
# Packaging stage
20-
# Image source: https://github.com/litmuschaos/test-tools/blob/master/custom/hardened-alpine/infra/Dockerfile
21-
# The base image is non-root (have litmus user) with default litmus directory.
22-
FROM litmuschaos/infra-alpine
20+
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.4
2321

2422
LABEL maintainer="LitmusChaos"
2523

26-
COPY --from=builder /output/chaos-exporter /litmus
24+
ENV APP_DIR="/litmus"
25+
26+
COPY --from=builder /output/chaos-exporter $APP_DIR/
27+
RUN chown 65534:0 $APP_DIR/chaos-exporter && chmod 755 $APP_DIR/chaos-exporter
28+
29+
WORKDIR $APP_DIR
30+
USER 65534
31+
2732
CMD ["./chaos-exporter"]
33+
2834
EXPOSE 8080

0 commit comments

Comments
 (0)
Please sign in to comment.