From feb20c6fb42256d556c4f0299fbe3edea77a31dc Mon Sep 17 00:00:00 2001 From: Rosyya Date: Wed, 14 Aug 2024 18:10:20 +0800 Subject: [PATCH] test distroless image --- Dockerfile.distroless | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Dockerfile.distroless b/Dockerfile.distroless index 97e9105..0e99163 100644 --- a/Dockerfile.distroless +++ b/Dockerfile.distroless @@ -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"] \ No newline at end of file +COPY --from=builder --chown=nonroot:nonroot /gnfd-qa-test-monitor/build/monitor $WORKDIR +RUN pwd && ls -al +ENTRYPOINT ["./monitor"] \ No newline at end of file