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

registry-mirror setting in /kaniko/.docker/config.json #1752

Closed
oweis-telit opened this issue Sep 27, 2021 · 4 comments · Fixed by #1875
Closed

registry-mirror setting in /kaniko/.docker/config.json #1752

oweis-telit opened this issue Sep 27, 2021 · 4 comments · Fixed by #1875

Comments

@oweis-telit
Copy link

oweis-telit commented Sep 27, 2021

it would be very nice to have the registry-mirror functionality also available in the /kaniko/.docker/config.json file.

as we can provide the config for each runner in this file, the users would not have to use the parameter manually in each of their pipelines.

as I searched for it and couldn't find it, is there any central documentation which settings are possible in the /kaniko/.docker/config.json file?

thanks in advance
Oliver

@chris-ng-scmp
Copy link

I am looking for this feature as well

@imjasonh
Copy link
Collaborator

imjasonh commented Jan 7, 2022

The .docker/config.json used by Kaniko is the same as the one used by Docker, mainly used to describe auth options. For example, when you docker login, config.json is updated to store those credentials.

I'd prefer not to add Kaniko-specific options to the config, since it presents an opportunity for the two configs to diverge over time.

Perhaps Kaniko supporting an env var to describe mirror registries would help in your case? I think that might even be something Cobra/Viper already support, it'd just need to be tested and documented.

@chris-ng-scmp
Copy link

The .docker/config.json used by Kaniko is the same as the one used by Docker, mainly used to describe auth options. For example, when you docker login, config.json is updated to store those credentials.

I'd prefer not to add Kaniko-specific options to the config, since it presents an opportunity for the two configs to diverge over time.

Perhaps Kaniko supporting an env var to describe mirror registries would help in your case? I think that might even be something Cobra/Viper already support, it'd just need to be tested and documented.

Agree, anyway to not set the mirror registries by flag is good to solve my use case

My use case is developers use different flag options with Kaniko, they override the script in CI, we can't make sure all the jobs set by different developers in different projects with a proper registry-mirror flag.

@imjasonh
Copy link
Collaborator

imjasonh commented Jan 7, 2022

#1875 should work for you.

I'm a little worried in general that this opens the floodgates to set other flags by env var, but if we start down that path we can use spf13/viper along with spf13/cobra to generalize setting flags by env vars.

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 a pull request may close this issue.

3 participants