TarReader return an io.ReadCloser to read the filesystem contents of the image, as resolved to the provided architecture.
()
| 80 | // TarReader return an io.ReadCloser to read the filesystem contents of the image, |
| 81 | // as resolved to the provided architecture. |
| 82 | func (c ImageSource) TarReader() (io.ReadCloser, error) { |
| 83 | imageName := c.ref.String() |
| 84 | |
| 85 | // get a reference to the image |
| 86 | image, err := c.provider.findImage(imageName, *c.platform) |
| 87 | if err != nil { |
| 88 | return nil, err |
| 89 | } |
| 90 | |
| 91 | return mutate.Extract(image), nil |
| 92 | } |
| 93 | |
| 94 | // V1TarReader return an io.ReadCloser to read the image as a v1 tarball |
| 95 | func (c ImageSource) V1TarReader(overrideName string) (io.ReadCloser, error) { |