Skip to content

Commit

Permalink
Merge pull request #153 from dusdjhyeon/ubi-migration
Browse files Browse the repository at this point in the history
UBI migration of Images - chaos-exporter
  • Loading branch information
Jonsy13 authored Aug 6, 2024
2 parents 1a156cf + 2f41e92 commit 5c105e7
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,18 @@ RUN go env
RUN CGO_ENABLED=0 go build -buildvcs=false -o /output/chaos-exporter -v ./cmd/exporter/

# 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"

COPY --from=builder /output/chaos-exporter /litmus
ENV APP_DIR="/litmus"

COPY --from=builder /output/chaos-exporter $APP_DIR/
RUN chown 65534:0 $APP_DIR/chaos-exporter && chmod 755 $APP_DIR/chaos-exporter

WORKDIR $APP_DIR
USER 65534

CMD ["./chaos-exporter"]

EXPOSE 8080

0 comments on commit 5c105e7

Please sign in to comment.