File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -625,6 +625,10 @@ func Run(ctx context.Context, options Options) error {
625
625
626
626
endStage := startStage ("🏗️ Building image..." )
627
627
// At this point we have all the context, we can now build!
628
+ registryMirror := []string {}
629
+ if val , ok := os .LookupEnv ("KANIKO_REGISTRY_MIRROR" ); ok {
630
+ registryMirror = strings .Split (val , ";" )
631
+ }
628
632
image , err := executor .DoBuild (& config.KanikoOptions {
629
633
// Boilerplate!
630
634
CustomPlatform : platforms .Format (platforms .Normalize (platforms .DefaultSpec ())),
@@ -656,6 +660,11 @@ func Run(ctx context.Context, options Options) error {
656
660
Insecure : options .Insecure ,
657
661
InsecurePull : options .Insecure ,
658
662
SkipTLSVerify : options .Insecure ,
663
+ // Enables registry mirror features in Kaniko, see more in link below
664
+ // https://github.com/GoogleContainerTools/kaniko?tab=readme-ov-file#flag---registry-mirror
665
+ // Related to PR #114
666
+ // https://github.com/coder/envbuilder/pull/114
667
+ RegistryMirrors : registryMirror ,
659
668
},
660
669
SrcContext : buildParams .BuildContext ,
661
670
})
You can’t perform that action at this time.
0 commit comments