Skip to content

Conversation

@deitch
Copy link
Collaborator

@deitch deitch commented Jul 1, 2025

- What I did
lkt pkg build, which calls buildkit, always just pulls down any required images (FROM stages) anonymously. This can be an issue with accessing private registries, as well as rate pull limits.

This adds support for authentication in 2 ways.

  1. It uses your local default docker auth. Whatever docker pull would use, likely ~/.docker/config.json or your OS specific variant, it inherits and passes on to buildkit.
  2. It allows you to add explicit credentials to registries using --registry-creds multiple 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

@deitch deitch force-pushed the pkg-build-registry-auth branch from ade0933 to 814fb37 Compare July 2, 2025 15:10
@deitch deitch changed the title add support for pkg build authentication add support for pkg build authentication and passing config to buildkitd Jul 2, 2025
@deitch deitch merged commit 2b46873 into linuxkit:master Jul 2, 2025
22 checks passed
@deitch deitch deleted the pkg-build-registry-auth branch July 2, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant