Skip to content

Commit

Permalink
feat: add registry mirror environment variable option
Browse files Browse the repository at this point in the history
The KANIKO_REGISTRY_MIRROR environment variable can set to mirror of docker hub.
Useful when rate limited by docker hub.
  • Loading branch information
jw910731 committed Mar 26, 2024
1 parent c727288 commit 345ee70
Showing 1 changed file with 1 addition and 0 deletions.
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"), ";"),
},
SrcContext: buildParams.BuildContext,
})
Expand Down

0 comments on commit 345ee70

Please sign in to comment.