Skip to content

Commit

Permalink
crane: ignore buildx attestations in flatten (#1630)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonjohnsonjr authored Apr 6, 2023
1 parent 93be9c4 commit 0577676
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd/crane/cmd/flatten.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,14 @@ func flattenIndex(old v1.ImageIndex, repo name.Repository, use string, o crane.O
return nil, err
}

// Drop attestations (for now).
// https://github.com/google/go-containerregistry/issues/1622
if p := desc.Platform; p != nil {
if p.OS == "unknown" && p.Architecture == "unknown" {
continue
}
}

flattened, err := flattenChild(m, repo, use, o)
if err != nil {
return nil, err
Expand Down

0 comments on commit 0577676

Please sign in to comment.