Skip to content
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

[Buildkit] Refactoring builds function to interact with buildkit sdk #4023

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

Comments

@Shubhranshu153
Copy link
Contributor

What is the problem you're trying to solve

Currently nerdctl forks a process to run buildctl for the builds. This creates an issue for finch-daemon to pass in credentials received as part of the API request to pass onto buildctl. One way is to write it to the docker/config.json but that is not inherently secured.

Describe the solution you'd like

Options:

  1. Use buildkit sdk for the build functionalities in nerdctl.
  2. Add an username, password option to buildctl to take in as argument.

@AkihiroSuda any suggestions which is a preferable option. Personally option 1 seems to be a better solution as it moves away from forking a process from the daemon along with handling the credentials. Let me know your thoughts.

Additional context

No response

@apostasie
Copy link
Contributor

apostasie commented Mar 19, 2025

Last I checked, removing the shell out and baking in the buildkit SDK was a no go - #3196
Maybe we changed opinion on this though.

Happy to help if we want to go that route (I will do it anyhow on my fork).

@AkihiroSuda
Copy link
Member

AkihiroSuda commented Mar 20, 2025

I still prefer shelling out buildctl.

Add an username, password option to buildctl to take in as argument.

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

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