This commit is contained in:
Martin Zihlmann 2025-06-12 18:55:58 -03:00 committed by GitHub
commit 52c6188767
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -92,7 +92,11 @@ func newStageBuilder(args *dockerfile.BuildArgs, opts *config.KanikoOptions, sta
return nil, err
}
imageConfig, err := initializeConfig(sourceImage, opts)
_opts := *opts
if !stage.Final {
_opts.Labels = []string{}
}
imageConfig, err := initializeConfig(sourceImage, &_opts)
if err != nil {
return nil, err
}