Fix empty container layer history and UI (#21251)

Fixes #21248
This commit is contained in:
KN4CK3R 2022-09-27 15:03:24 +02:00 committed by GitHub
parent 31f934c1d8
commit 904b324716
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 3 deletions

View file

@ -95,7 +95,9 @@ func parseOCIImageConfig(r io.Reader) (*Metadata, error) {
if i := strings.Index(cmd, "#(nop) "); i != -1 {
cmd = strings.TrimSpace(cmd[i+7:])
}
imageLayers = append(imageLayers, cmd)
if cmd != "" {
imageLayers = append(imageLayers, cmd)
}
}
metadata := &Metadata{