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

Facilitate usage of nerdctl as a library to build other clients #3380

Open
apostasie opened this issue Aug 29, 2024 · 2 comments
Open

Facilitate usage of nerdctl as a library to build other clients #3380

apostasie opened this issue Aug 29, 2024 · 2 comments

Comments

@apostasie
Copy link
Contributor

apostasie commented Aug 29, 2024

What is the problem you're trying to solve

I do maintain a fork for my own use, that contains radical changes that do not fit here.

As such, I want "my" nerdctl binary to be named differently, and also use different config, storage locations and labels names to avoid conflicts.

Generally, people looking at building their own x-ctl should be able to leverage nerdctl codebase to do that.

The problem right now is that "nerdctl" is hardcoded in a bunch of places, making that task rather pedestrian and error prone.

Describe the solution you'd like

Suggesting that "nerdctl" strings across the codebase are reviewed and at least turned into constants that would be easy to change - or better, maybe we overload global config with a "Name" property that would default to "nerdctl" of course.

Let me know what the team here thinks about this use-case, and possible solutions.

Additional context

No response

@AkihiroSuda
Copy link
Member

Suggesting that "nerdctl" strings across the codebase are reviewed and at least turned into constants that would be easy to change - or better, maybe we overload global config with a "Name" property that would default to "nerdctl" of course.

Probably this should be defined as a variable that can be overridden with go build -X ?

@apostasie
Copy link
Contributor Author

Suggesting that "nerdctl" strings across the codebase are reviewed and at least turned into constants that would be easy to change - or better, maybe we overload global config with a "Name" property that would default to "nerdctl" of course.

Probably this should be defined as a variable that can be overridden with go build -X ?

Yeah, I like that ^.
Will send a PR.

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

2 participants