image

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	dockerimage.Image
}

Config stores the image configuration.

type HistoryToLayer

type HistoryToLayer struct {
	History dockerimage.History
	Layer   *filetree.FileTree
	LayerID string
}

type ImageArchive

type ImageArchive struct {
	Manifest *Manifest
	Config   *Config
	LayerMap map[string]*filetree.FileTree
}

func NewImageArchive

func NewImageArchive(tarFile io.Reader) (*ImageArchive, error)

NewImageArchive creates ImageArchive from a tar file.

func (*ImageArchive) GetFileTreeByLayerIndex

func (img *ImageArchive) GetFileTreeByLayerIndex(index int) (*filetree.FileTree, error)

GetFileTreeByLayerIndex returns FileTree for the layer specified by index.

func (*ImageArchive) GetHistoryToLayers

func (img *ImageArchive) GetHistoryToLayers() ([]*HistoryToLayer, error)

GetHistoryToLayers returns sets of a history and a layer. It ignores a history which doesn't have a layer created by it.

func (*ImageArchive) GetLatestFileNode

func (img *ImageArchive) GetLatestFileNode(path string) *filetree.FileNode

GetLatestFileNode searches FileNode based on the path and returns the latest one. If the path doesn't exist in all layers, it returns nil.

type Manifest

type Manifest struct {
	ConfigPath    string   `json:"Config"`
	RepoTags      []string `json:"RepoTags"`
	LayerTarPaths []string `json:"Layers"`
}

Manifest stores information from manifest.json in the image compressed as a tar file.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL