Skip to content

Commit 0577676

Browse files
authored
crane: ignore buildx attestations in flatten (#1630)
1 parent 93be9c4 commit 0577676

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cmd/crane/cmd/flatten.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,14 @@ func flattenIndex(old v1.ImageIndex, repo name.Repository, use string, o crane.O
152152
return nil, err
153153
}
154154

155+
// Drop attestations (for now).
156+
// https://github.com/google/go-containerregistry/issues/1622
157+
if p := desc.Platform; p != nil {
158+
if p.OS == "unknown" && p.Architecture == "unknown" {
159+
continue
160+
}
161+
}
162+
155163
flattened, err := flattenChild(m, repo, use, o)
156164
if err != nil {
157165
return nil, err

0 commit comments

Comments
 (0)