File tree Expand file tree Collapse file tree 3 files changed +22
-2
lines changed Expand file tree Collapse file tree 3 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 1- /deployments /container
1+ .dockerignore
2+ deployments /container
3+ * .tar
4+ * .tgz
5+ demo
6+ .git
Original file line number Diff line number Diff line change 1+ # syntax=docker.io/docker/dockerfile:1.7-labs
2+ # The above enables the COPY --exclude flag, see:
3+ # https://github.com/moby/buildkit/pull/4561
4+
15# Copyright (c) 2019-2025, NVIDIA CORPORATION. All rights reserved.
26#
37# Licensed under the Apache License, Version 2.0 (the "License");
@@ -46,7 +50,16 @@ ENV GOPATH=/go
4650ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH
4751
4852WORKDIR /build
49- COPY . .
53+
54+ # Copy everything that is needed for the go build, but do not invalidate go
55+ # build artifact layer unnecessarily often. Note that --exclude only affects the
56+ # cache.
57+ COPY --exclude=./templates/** \
58+ --exclude=./deployments/helm/** \
59+ --exclude=./hack/kubelet-plugin-prestart.sh \
60+ --exclude=./demo/** \
61+ --exclude=./Dockerfile \
62+ . .
5063
5164RUN mkdir /artifacts
5265
@@ -96,3 +109,4 @@ COPY --from=build /artifacts/compute-domain-daemon /usr/bin/compute-do
96109COPY --from=build /artifacts/gpu-kubelet-plugin /usr/bin/gpu-kubelet-plugin
97110COPY --from=build /build/hack/kubelet-plugin-prestart.sh /usr/bin/kubelet-plugin-prestart.sh
98111COPY --from=build /build/templates /templates
112+ COPY /templates /templates
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ $(IMAGE_TARGETS): image-%:
8787 --build-arg TOOLKIT_CONTAINER_IMAGE=" $( TOOLKIT_CONTAINER_IMAGE) " \
8888 --build-arg VERSION=" $( VERSION) " \
8989 --build-arg GIT_COMMIT=" $( GIT_COMMIT) " \
90+ --progress=plain \
9091 -f $(DOCKERFILE ) \
9192 $(CURDIR )
9293
You can’t perform that action at this time.
0 commit comments