Skip to content

Commit

Permalink
feat: Implemented non-root user
Browse files Browse the repository at this point in the history
  • Loading branch information
dploeger committed Oct 27, 2023
1 parent 344b05f commit 919d5b4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ RUN go build -o /serve cmd/serve.go

FROM alpine:latest

COPY --from=build /serve /
RUN adduser -u 1000 -D app app

USER app

COPY --from=build /serve /home/app/serve

EXPOSE 8080

ENTRYPOINT ["/serve"]
ENTRYPOINT ["/home/app/serve"]

0 comments on commit 919d5b4

Please sign in to comment.