File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -8,11 +8,14 @@ COPY api/nfd/go.mod api/nfd/go.sum /go/node-feature-discovery/api/nfd/
88
99WORKDIR /go/node-feature-discovery
1010
11+ RUN --mount=type=cache,target=/go/pkg/mod/ \
12+ go mod download
13+
1114# Do actual build
1215COPY . /go/node-feature-discovery
1316
14- ARG VERSION
15- ARG HOSTMOUNT_PREFIX
17+ RUN --mount=type=cache,target=/go/pkg/mod/ \
18+ make install VERSION=v0.0.0
1619
1720# Create minimal variant of the production image
1821FROM nvcr.io/nvidia/distroless/go:v3.1.8 AS final
@@ -26,4 +29,4 @@ ENV GRPC_GO_LOG_SEVERITY_LEVEL="INFO"
2629COPY --from=builder /go/node-feature-discovery/deployment/components/worker-config/nfd-worker.conf.example /etc/kubernetes/node-feature-discovery/nfd-worker.conf
2730COPY --from=builder /go/bin/* /usr/bin/
2831#Copy the source code to the image
29- COPY --from=builder . /usr/src/node-feature-discovery
32+ COPY --from=builder . /usr/src/node-feature-discovery
You can’t perform that action at this time.
0 commit comments