Skip to content

Commit db4a21b

Browse files
committed
Dockerfile optimized.
1 parent baba76e commit db4a21b

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

Dockerfile

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,7 @@ RUN go mod download
66
COPY . .
77
RUN go build -a -o webpalm -trimpath
88

9-
FROM alpine:latest
10-
11-
RUN apk add --no-cache ca-certificates \
12-
&& rm -rf /var/cache/*
13-
14-
RUN mkdir -p /app \
15-
&& adduser -D webpalm \
16-
&& chown -R webpalm:webpalm /app
17-
18-
USER webpalm
19-
WORKDIR /app
9+
FROM scratch AS final
2010

2111
COPY --from=build-env /src/webpalm .
2212

0 commit comments

Comments
 (0)