Skip to content

[Feature] Expose --username and --password in buildctl #5860

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Shubhranshu153 opened this issue Mar 19, 2025 · 3 comments
Open

[Feature] Expose --username and --password in buildctl #5860

Shubhranshu153 opened this issue Mar 19, 2025 · 3 comments

Comments

@Shubhranshu153
Copy link

Description

Hi,

I Would like to expose the --username and --password option to buildctl build so that we can call the build without the credentials getting stored in ~/.docker/config.json.

Checking if this is something we can add as an enhancement to buildctl to be able to use buildctl directly in clients.

@AkihiroSuda
Copy link
Member

I Would like to expose the --username and --password option to buildctl build so that we can call the build without the credentials getting stored in ~/.docker/config.json.

This is even worse because it leaks the password in ps.

Probably the options should be passed via an FD?
Or just set DOCKER_CONFIG to be a tmp dir

Related:

@tonistiigi
Copy link
Member

Buildkit isn't just talking to one registry like ctr image pull. Would at least need credentials per host. And indeed, static passwords in args is worse than files/env as source.

@Shubhranshu153
Copy link
Author

As akahiro said, i like the idea of passing it as file descriptor and along with an option to pass it in as a path file
--config fd:<> / file:<>. i will try out a PoC and see if that works.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants