Skip to content

Commit

Permalink
Don't run docker image as root
Browse files Browse the repository at this point in the history
  • Loading branch information
Exchizz authored Aug 5, 2024
1 parent 633a7f5 commit f75993a
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 @@ -2,6 +2,10 @@

FROM golang:1.21-alpine

RUN adduser -D runas
USER runas


WORKDIR /app

COPY go.mod ./
Expand All @@ -15,5 +19,3 @@ RUN go build -o /docker-kube-learning
EXPOSE 8080

CMD [ "/docker-kube-learning" ]


0 comments on commit f75993a

Please sign in to comment.