Skip to content

Commit

Permalink
test distroless image
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosyya committed Aug 14, 2024
1 parent 5012ec5 commit feb20c6
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Dockerfile.distroless
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ RUN apk add --no-cache gcc libstdc++-dev libc-dev
RUN cd /gnfd-qa-test-monitor \
&& go build -o ./build/monitor main.go

FROM gcr.io/distroless/base-debian11
RUN pwd && ls -al

FROM alpine:3.17

USER nonroot:nonroot
WORKDIR /home/nonroot
# COPY --from=builder --chown=nonroot:nonroot /gnfd-qa-test-monitor/build/monitor $WORKDIR
# ENTRYPOINT ["./monitor"]

COPY --from=builder --chown=nonroot:nonroot /gnfd-qa-test-monitor/build/* ${WORKDIR}/

ENTRYPOINT ["/app/monitor"]
COPY --from=builder --chown=nonroot:nonroot /gnfd-qa-test-monitor/build/monitor $WORKDIR
RUN pwd && ls -al
ENTRYPOINT ["./monitor"]

0 comments on commit feb20c6

Please sign in to comment.