Merge pull request #4 from mzihlmann/add-labels-on-last-image
fix: intermediate images should not be labelled
This commit is contained in:
commit
b34d005c0e
|
|
@ -772,6 +772,9 @@ func DoBuild(opts *config.KanikoOptions) (v1.Image, error) {
|
||||||
configFile.OS = strings.Split(opts.CustomPlatform, "/")[0]
|
configFile.OS = strings.Split(opts.CustomPlatform, "/")[0]
|
||||||
configFile.Architecture = strings.Split(opts.CustomPlatform, "/")[1]
|
configFile.Architecture = strings.Split(opts.CustomPlatform, "/")[1]
|
||||||
}
|
}
|
||||||
|
if !stage.Final {
|
||||||
|
configFile.Config.Labels = map[string]string{}
|
||||||
|
}
|
||||||
sourceImage, err = mutate.ConfigFile(sourceImage, configFile)
|
sourceImage, err = mutate.ConfigFile(sourceImage, configFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue