fix(docker-build): route BuildKit pulls through the NVIDIA Docker Hub mirror#48
Merged
Conversation
Configure docker/setup-buildx-action with a buildkitd config that the nv-gha-runners pre-populate at /etc/buildkit/buildkitd.toml. That file routes BuildKit's docker.io pulls through dockerhub.nvidia.com, NVIDIA's Artifactory pull-through cache, instead of going straight to Docker Hub. Without this, BuildKit on nv-gha-runners ignores the daemon-level mirror and pulls anonymously from Docker Hub, which hits the unauthenticated rate limit and breaks Docker builds across DSX repos (nvbug 6225636). Three call sites are updated: - .github/actions/docker-build/action.yml — the composite action used by every consumer (e.g. dsx-exchange). Bumping the consuming repos to the next tag of this action is all they need to do. - .github/workflows/build-cds-containers.yml — this repo's own image build workflow. - .github/actions/security-container-scan/README.md — example snippets now show the BuildKit config step so adopters copy the right pattern. Follows the documented NVIDIA GHA platform best practice: https://docs.gha-runners.nvidia.com/platform/best-practices/#use-docker-cache-for-buildkit Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Brian R. Jackson <brijackson@nvidia.com>
|
All contributors have signed the DCO ✍️ ✅ |
Contributor
Author
|
I have read the DCO Document and I hereby sign the DCO |
nvjaxzin
commented
May 26, 2026
Comment on lines
+42
to
+46
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| with: | ||
| buildkitd-config: /etc/buildkit/buildkitd.toml | ||
|
|
Contributor
Author
There was a problem hiding this comment.
Example code, but this is intentional to make sure the example is complete and correct.
nvjaxzin
commented
May 26, 2026
Comment on lines
+76
to
+80
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| with: | ||
| buildkitd-config: /etc/buildkit/buildkitd.toml | ||
|
|
Contributor
Author
There was a problem hiding this comment.
Example code, but this is intentional to make sure the example is complete and correct.
abegnoche
approved these changes
May 26, 2026
Closed
4 tasks
Contributor
Author
|
/ok to test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Configures
docker/setup-buildx-actionto read/etc/buildkit/buildkitd.toml, the file thenv-gha-runnersalready pre-populate. That config routes BuildKit'sdocker.iopulls throughdockerhub.nvidia.com(NVIDIA's Artifactory pull-through cache) instead of going straight to Docker Hub.Without this, BuildKit on the self-hosted runners ignores the daemon-level mirror and pulls anonymously from Docker Hub, which hits the unauthenticated rate limit and breaks Docker builds across DSX repos.
Reference: nvbug 6225636.
Changes
.github/actions/docker-build/action.yml— the composite action consumed by downstream DSX repos. This is the load-bearing change: bumping the consumed tag is the only thing downstream repos need to do..github/workflows/build-cds-containers.yml— this repo's own container build workflow gets the same fix..github/actions/security-container-scan/README.md— example snippets now show the BuildKit config step so adopters copy the correct pattern.The reusable workflow
.github/workflows/docker-build.ymlis covered transitively because it delegates to the composite action above.Not modified (BuildKit not involved):
docker pull/docker buildcall sites that go through the Docker daemon directly. Thenv-gha-runnersDocker daemon is already configured withdockerhub.nvidia.comas a registry mirror at the host level.Why this is the right fix
This matches the NVIDIA GHA platform team's documented best practice: https://docs.gha-runners.nvidia.com/platform/best-practices/#use-docker-cache-for-buildkit
The toml file is already on every
nv-gha-runnersrunner image, so there's nothing to deploy on the infra side — this is purely a workflow-level opt-in.Test plan
Static validation performed locally:
python -m yamlparses all three edited files cleanly.actionlint v1.7.7exits clean (-no-color -oneline) onbuild-cds-containers.ymlanddocker-build.yml. (actionlintdoes not lint composite-action manifests;action.ymlschema is validated by GHA at action invocation.)Live validation (requires runners; needs a vetter to allow
copy-pr-bot):build-cds-containers.ymlmatches the path filter on.github/workflows/build-cds-containers.ymlandcds-containers/**. Once a vetter approves thecopy-pr-botmirror, the workflow should run onpull-request/**and exercise the newbuildkitd-config:end-to-end.Rollout
After merge, cut a new tag of this action (next semver, likely
v1.17.0). Downstream consumers pick it up via a one-line bump of theuses:SHA/tag — no per-repo workflow surgery required.cc @huaweic-nv @mmou-nv @abegnoche @lachen-nv