add support for pkg build authentication and passing config to buildkitd #4137
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.
- What I did
lkt pkg build, which calls buildkit, always just pulls down any required images (FROMstages) anonymously. This can be an issue with accessing private registries, as well as rate pull limits.This adds support for authentication in 2 ways.
docker pullwould use, likely~/.docker/config.jsonor your OS specific variant, it inherits and passes on to buildkit.--registry-credsmultiple times. The help explains how to provide a token vs user/pass.In addition, if you want to set the buildkitd to run with a specific
config.toml, you can pass it.It checks that your runner has configured with the correct buildkit config.toml and, if not, overrides it.
- How I did it
Changed
- How to verify it
CI will ensure now regressions. I still am trying to figure out how to provide an automated test.
- Description for the changelog
pkg build supports authentication to registries