feat: update Dockerfile to add builder user and improve build environment
This commit is contained in:
@@ -5,10 +5,13 @@ ENV CGO_ENABLED=0
|
||||
ENV GOOS=linux
|
||||
ENV GOARCH=amd64
|
||||
|
||||
RUN apk add --no-cache git
|
||||
RUN apk add --no-cache git && \
|
||||
adduser -D -s /bin/sh builder
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
USER builder
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
|
||||
Reference in New Issue
Block a user