Skip to content

Commit

Permalink
fix: intermediate images should not be labelled
Browse files Browse the repository at this point in the history
  • Loading branch information
mzihlmann committed Feb 16, 2025
1 parent e328007 commit 79ce1d4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/executor/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,9 @@ func DoBuild(opts *config.KanikoOptions) (v1.Image, error) {
configFile.OS = strings.Split(opts.CustomPlatform, "/")[0]
configFile.Architecture = strings.Split(opts.CustomPlatform, "/")[1]
}
if !stage.Final {
configFile.Config.Labels = map[string]string{}
}
sourceImage, err = mutate.ConfigFile(sourceImage, configFile)
if err != nil {
return nil, err
Expand Down

0 comments on commit 79ce1d4

Please sign in to comment.