Skip to content

Commit 0a93149

Browse files
authored
fix: copy only sources file to container (#12)
Signed-off-by: Fred Rolland <[email protected]>
1 parent c62bcec commit 0a93149

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Dockerfile.nvidia

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ RUN --mount=type=cache,target=/go/pkg/mod/ \
1919
make install VERSION=v0.0.0 HOSTMOUNT_PREFIX=/host-
2020

2121
# Create minimal variant of the production image
22-
FROM nvcr.io/nvidia/distroless/go:v3.1.8 AS final
22+
FROM nvcr.io/nvidia/distroless/go:v3.1.10 AS final
2323

2424
# Run as unprivileged user
2525
USER 65534:65534
@@ -29,5 +29,5 @@ ENV GRPC_GO_LOG_SEVERITY_LEVEL="INFO"
2929

3030
COPY --from=builder /go/node-feature-discovery/deployment/components/worker-config/nfd-worker.conf.example /etc/kubernetes/node-feature-discovery/nfd-worker.conf
3131
COPY --from=builder /go/bin/* /usr/bin/
32-
#Copy the source code to the image
33-
COPY --from=builder . /usr/src/node-feature-discovery
32+
# Copy only the source code directory, not the entire builder context
33+
COPY --from=builder /go/node-feature-discovery /usr/src/node-feature-discovery

0 commit comments

Comments
 (0)