mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-18 01:34:36 +02:00
Add KANIKO_REGISTRY_MIRROR env var (#1875)
This commit is contained in:
@@ -218,6 +218,11 @@ func addKanikoOptionsFlags() {
|
||||
RootCmd.PersistentFlags().BoolVarP(&opts.CacheCopyLayers, "cache-copy-layers", "", false, "Caches copy layers")
|
||||
RootCmd.PersistentFlags().VarP(&opts.IgnorePaths, "ignore-path", "", "Ignore these paths when taking a snapshot. Set it repeatedly for multiple paths.")
|
||||
RootCmd.PersistentFlags().BoolVarP(&opts.ForceBuildMetadata, "force-build-metadata", "", false, "Force add metadata layers to build image")
|
||||
|
||||
// Allow setting --registry-mirror using an environment variable.
|
||||
if val, ok := os.LookupEnv("KANIKO_REGISTRY_MIRROR"); ok {
|
||||
opts.RegistryMirrors.Set(val)
|
||||
}
|
||||
}
|
||||
|
||||
// addHiddenFlags marks certain flags as hidden from the executor help text
|
||||
|
||||
Reference in New Issue
Block a user