Skip to content

Add registry mirror environment variable option #114

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

Merged
merged 4 commits into from
Mar 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions envbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,7 @@ func Run(ctx context.Context, options Options) error {
Insecure: options.Insecure,
InsecurePull: options.Insecure,
SkipTLSVerify: options.Insecure,
RegistryMirrors: strings.Split(os.Getenv("KANIKO_REGISTRY_MIRROR"), ";"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about splitting on instead? ; seems a bit less standard to me.

It'd be great to add a comment linking to this PR and these docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I references the environment variable design in Kaniko (link), it uses ; to separate multiple registry map.
I think it might be better if we follows Kaniko's environment variable format.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed!

},
SrcContext: buildParams.BuildContext,
})
Expand Down
Loading