Skip to content

Commit

Permalink
distroless image
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosyya committed Aug 14, 2024
1 parent ee0eee5 commit df17304
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN cd /gnfd-qa-test-monitor \
&& go build -o build/monitor main.go

# Pull greenfield into a second stage deploy alpine container
FROM alpine:3.17 AS deploy
FROM alpine:3.17 AS deployer

ARG USER=sp
ARG USER_UID=1000
Expand Down Expand Up @@ -47,6 +47,8 @@ USER ${USER_UID}:${USER_GID}

# distroless image.
FROM gcr.io/distroless/static-debian11
COPY --from=deploy /app/monitor /app/monitor
ENV WORKDIR=/app
WORKDIR ${WORKDIR}
COPY --from=deployer ${WORKDIR}/ ${WORKDIR}/
USER ${USER_UID}:${USER_GID}
ENTRYPOINT ["/app/monitor"]

0 comments on commit df17304

Please sign in to comment.