Skip to content

Commit d200e0b

Browse files
authored
Change web base image from debian to scratch (#6006)
It only required removing `RUN mkdir -p app` from the Dockerfile, which is not really needed. This diminishes the image size and avoids having frequent vulnerability reports by image scanners in clusters appearing in debian. We were upgrading the base image whenever we could, but it's an issue for older releases. Addresses comment in #5198
1 parent 2278f04 commit d200e0b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

web/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,12 @@ ARG TARGETARCH
5353
RUN CGO_ENABLED=0 GOOS=linux GOARCH=$TARGETARCH go build -mod=readonly -o web/web -ldflags "-s -w" ./web
5454

5555
## package it all up
56-
FROM debian:buster-20210208-slim
56+
FROM scratch
5757
WORKDIR /linkerd
5858

5959
COPY --from=await /tmp/linkerd-await .
6060
COPY LICENSE .
6161
COPY --from=golang /linkerd-build/web/web .
62-
RUN mkdir -p app
6362
COPY --from=webpack-bundle /linkerd-build/web/app/dist app/dist
6463
COPY web/templates templates
6564
COPY --from=golang /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

0 commit comments

Comments
 (0)