Skip to content

Commit

Permalink
Stop using deprecated VirtualSize field (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
neersighted authored Jan 20, 2024
2 parents 77b8604 + 21b04c5 commit 9ac80da
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions core/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,11 @@ func imageToRuntimeAPIImage(image *dockertypes.ImageSummary) (*runtimeapi.Image,
return nil, fmt.Errorf("unable to convert a nil pointer to a runtime API image")
}

size := uint64(image.VirtualSize)
return &runtimeapi.Image{
Id: image.ID,
RepoTags: image.RepoTags,
RepoDigests: image.RepoDigests,
Size_: size,
Size_: uint64(image.Size),
}, nil
}

Expand All @@ -56,12 +55,11 @@ func imageInspectToRuntimeAPIImage(image *dockertypes.ImageInspect) (*runtimeapi
return nil, fmt.Errorf("unable to convert a nil pointer to a runtime API image")
}

size := uint64(image.VirtualSize)
runtimeImage := &runtimeapi.Image{
Id: image.ID,
RepoTags: image.RepoTags,
RepoDigests: image.RepoDigests,
Size_: size,
Size_: uint64(image.Size),
}

uid, username := getUserFromImageUser(image.Config.User)
Expand Down

0 comments on commit 9ac80da

Please sign in to comment.