Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags="-w -s -X '


# get latest alpine container
FROM alpine:latest
FROM alpine:3.19.1

# create nonroot user
RUN addgroup -S nonroot \
&& adduser -S nonroot -G nonroot

# add ca-certificates
RUN apk --no-cache add ca-certificates tzdata
Expand All @@ -34,6 +38,9 @@ WORKDIR /root/
# copy binary from first container
COPY --from=0 /go/src/app .

# set user
USER nonroot

# expose port 8080
EXPOSE 8080

Expand Down