Skip to content

Commit

Permalink
Merge pull request #4 from logzio/dockerfile-fix
Browse files Browse the repository at this point in the history
Fix permission error
  • Loading branch information
ralongit authored Oct 2, 2023
2 parents f17e40a + 4adf8c0 commit 7529bf4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ WORKDIR /app

COPY . .

RUN go build -v -o main .

# Create a non root group and user
RUN addgroup -S appgroup && adduser -S appuser -G appgroup

# Switch to the non root new user
USER appuser

RUN go build -o main .

FROM alpine:3.14
COPY --from=build /app/main /app/main
CMD ["/app/main"]

0 comments on commit 7529bf4

Please sign in to comment.