func newImageSource(ctx context.Context, ref archiveReference) (types.ImageSource, error) {
	if ref.destinationRef != nil {
		logrus.Warnf("docker-archive: references are not supported for sources (ignoring)")
	}
	src, err := tarfile.NewSourceFromFile(ref.path)
	if err != nil {
		return nil, err
	}
	return &archiveImageSource{
		Source: src,
		ref:    ref,
	}, nil
}
func newImageSource(ctx context.Context, ref archiveReference) (types.ImageSource, error) {
	if ref.destinationRef != nil {
		logrus.Warnf("docker-archive: references are not supported for sources (ignoring)")
	}
	src, err := tarfile.NewSourceFromFile(ref.path)
	if err != nil {
		return nil, err
	}
	return &archiveImageSource{
		Source: src,
		ref:    ref,
	}, nil
}
// newImageSource returns a types.ImageSource for the specified image reference.
// The caller must call .Close() on the returned ImageSource.