File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -11,15 +11,17 @@ COPY api/nfd/go.mod api/nfd/go.sum /go/node-feature-discovery/api/nfd/
11
11
12
12
WORKDIR /go/node-feature-discovery
13
13
14
- RUN go mod download
14
+ RUN --mount=type=cache,target=/go/pkg/mod/ \
15
+ go mod download
15
16
16
17
# Do actual build
17
18
COPY . /go/node-feature-discovery
18
19
19
20
ARG VERSION
20
21
ARG HOSTMOUNT_PREFIX
21
22
22
- RUN make install VERSION=$VERSION HOSTMOUNT_PREFIX=$HOSTMOUNT_PREFIX
23
+ RUN --mount=type=cache,target=/go/pkg/mod/ \
24
+ make install VERSION=$VERSION HOSTMOUNT_PREFIX=$HOSTMOUNT_PREFIX
23
25
24
26
# Create full variant of the production image
25
27
FROM ${BASE_IMAGE_FULL} AS full
Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ ARG BUILDER_IMAGE
2
2
FROM ${BUILDER_IMAGE} as builder
3
3
4
4
# Install tools
5
- RUN go install github.com/vektra/mockery/v2@v2.42.0 && \
5
+ RUN --mount=type=cache,target=/go/pkg/mod/ \
6
+ go install github.com/vektra/mockery/v2@v2.42.0 && \
6
7
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0 && \
7
8
go install golang.org/x/tools/cmd/goimports@v0.11.0 && \
8
9
go install github.com/golang/protobuf/protoc-gen-go@v1.4.3
You can’t perform that action at this time.
0 commit comments