Skip to content

Commit fb587c1

Browse files
Remove additional --update for apk in Dockerfile (#818)
There is no need to use --update with --no-cache when using apk on Alpine Linux, as using --no-cache will fetch the index every time and leave no local cache, so the index will always be the latest without temporary files remain in the image.
1 parent c3ede62 commit fb587c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
ARG GO_VERSION
22
FROM golang:${GO_VERSION}-alpine AS builder
3-
RUN apk add --update --no-cache ca-certificates make git curl gcc libc-dev
3+
RUN apk add --no-cache ca-certificates make git curl gcc libc-dev
44
RUN mkdir -p /build
55
WORKDIR /build
66
COPY . /build/
77
RUN go mod download
88
RUN make build-linux
99

1010
FROM golang:${GO_VERSION}-alpine
11-
RUN apk add --update --no-cache ca-certificates bash git gcc libc-dev openssh
11+
RUN apk add --no-cache ca-certificates bash git gcc libc-dev openssh
1212
ENV GO111MODULE on
1313
COPY --from=builder /build/gosec /bin/gosec
1414
COPY entrypoint.sh /bin/entrypoint.sh

0 commit comments

Comments
 (0)