Documentation ¶
Overview ¶
This package can be used to generate image configuration and blobs from an image JSON file.
First, you need to create an types.Image with NewImageFromFile.
With this types.Image object, it is then possible to get the image configuration with the GetConfigBlob method. To get layer blobs, you need to iterate on the layers of the image and use the GetBlob or LayerGetBlob functions to get a Reader on this layer.
Index ¶
- func GetBlob(image types.Image, digest godigest.Digest) (io.ReadCloser, int64, error)
- func GetConfigBlob(image types.Image) ([]byte, error)
- func GetConfigDigest(image types.Image) (d godigest.Digest, size int64, err error)
- func LayerGetBlob(layer types.Layer) (reader io.ReadCloser, size int64, err error)
- func NewImageFromDir(directory string) (image types.Image, err error)
- func NewImageFromFile(filename string) (image types.Image, err error)
- func NewLayers(storePaths []string, maxLayers int, parents []types.Layer, ...) ([]types.Layer, error)
- func NewLayersNonReproducible(storePaths []string, maxLayers int, tarDirectory string, parents []types.Layer, ...) (layers []types.Layer, err error)
- func TarPaths(paths types.Paths) io.ReadCloser
- func TarPathsSum(paths types.Paths) (digest.Digest, int64, error)
- func TarPathsWrite(paths types.Paths, destinationDirectory string) (string, digest.Digest, int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigBlob ¶
GetConfigBlob returns the config blog of an image.
func GetConfigDigest ¶
GetConfigDigest returns the digest and the size of the config blog of an image.
func LayerGetBlob ¶
func NewImageFromDir ¶
NewImageFromDir builds an Image based on an directory populated by the Skopeo dir transport. The directory needs to be a absolute path since tarball filepaths are referenced in the image Layers.
func NewImageFromFile ¶
NewImageFromDir creates an Image from a JSON file describing an image. This file has usually been created by Nix through the nix2container binary.
Types ¶
This section is empty.