Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
/deployments/container
.dockerignore
deployments/container
*.tar
*.tgz
demo
.git
16 changes: 15 additions & 1 deletion deployments/container/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# syntax=docker.io/docker/dockerfile:1.7-labs
# The above enables the COPY --exclude flag, see:
# https://github.com/moby/buildkit/pull/4561

# Copyright (c) 2019-2025, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -46,7 +50,16 @@ ENV GOPATH=/go
ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH

WORKDIR /build
COPY . .

# Copy everything that is needed for the go build, but do not invalidate go
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/but/and

# build artifact layer unnecessarily often. Note that --exclude only affects the
# cache.
COPY --exclude=./templates/** \
--exclude=./deployments/helm/** \
--exclude=./hack/kubelet-plugin-prestart.sh \
--exclude=./demo/** \
--exclude=./Dockerfile \
. .

RUN mkdir /artifacts

Expand Down Expand Up @@ -95,3 +108,4 @@ COPY --from=build /artifacts/compute-domain-kubelet-plugin /usr/bin/compute-do
COPY --from=build /artifacts/compute-domain-daemon /usr/bin/compute-domain-daemon
COPY --from=build /artifacts/gpu-kubelet-plugin /usr/bin/gpu-kubelet-plugin
COPY --from=build /build/templates /templates
COPY /templates /templates
1 change: 1 addition & 0 deletions deployments/container/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ $(IMAGE_TARGETS): image-%:
--build-arg TOOLKIT_CONTAINER_IMAGE="$(TOOLKIT_CONTAINER_IMAGE)" \
--build-arg VERSION="$(VERSION)" \
--build-arg GIT_COMMIT="$(GIT_COMMIT)" \
--progress=plain \
-f $(DOCKERFILE) \
$(CURDIR)

Expand Down
Loading