Skip to content

Commit df00820

Browse files
authored
add go mod download (kubernetes-sigs#769)
1 parent c5f94e1 commit df00820

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ FROM --platform=${BUILDPLATFORM} ${BUILDER_IMAGE} AS builder
66
ARG TARGETARCH
77

88
WORKDIR /workspace
9-
9+
# cache deps before building so that we don't need to re-download as much
10+
# and so that source changes don't invalidate our downloaded layer
1011
COPY . .
12+
RUN go mod download
1113
# Build
1214
# the GOARCH has not a default value to allow the binary be built according to the host where the command
1315
# was called. For example, if we call make docker-build in a local env which has the Apple Silicon M1 SO

0 commit comments

Comments
 (0)