Add platform filtering on children handler

Fixes pulling of multi-arch images by limiting the expansion
of the index by filtering to the current default platform.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
Derek McGowan
2017-09-20 14:23:26 -07:00
parent 9934acb271
commit eef47ffad3
6 changed files with 27 additions and 10 deletions

View File

@@ -58,7 +58,7 @@ var imagesListCommand = cli.Command{
tw := tabwriter.NewWriter(os.Stdout, 1, 8, 1, ' ', 0)
fmt.Fprintln(tw, "REF\tTYPE\tDIGEST\tSIZE\tPLATFORM\tLABELS\t")
for _, image := range imageList {
size, err := image.Size(ctx, cs)
size, err := image.Size(ctx, cs, platforms.Default())
if err != nil {
log.G(ctx).WithError(err).Errorf("failed calculating size for image %s", image.Name)
}