Check if a layer is provided in the manifest

This commit is contained in:
Ettore Di Giacinto
2019-11-26 20:22:33 +01:00
parent 393164da36
commit 6d25e5d881

View File

@@ -163,8 +163,11 @@ func (*SimpleDocker) ExtractRootfs(opts compiler.CompilerBackendOptions, keepPer
layers_sha := []string{}
for _, data := range manifestData {
for _, l := range data.Layers {
layers_sha = append(layers_sha, strings.Replace(l, "/layer.tar", "", -1))
if strings.Contains(l, "layer.tar") {
layers_sha = append(layers_sha, strings.Replace(l, "/layer.tar", "", -1))
}
}
}