image

package
v1.3.1-0...-eba451b Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2014 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const MaxImageDepth = 127

Set the max depth to the aufs default that most kernels are compiled with For more information see: http://sourceforge.net/p/aufs/aufs3-standalone/ci/aufs3.12/tree/config.mk

Variables

This section is empty.

Functions

func StoreImage

func StoreImage(img *Image, layerData archive.ArchiveReader, root string) error

StoreImage stores file system layer data for the given image to the image's registered storage driver. Image metadata is stored in a file at the specified root directory. This function also computes the TarSum of `layerData` (currently using tarsum.dev).

Types

type Graph

type Graph interface {
	Get(id string) (*Image, error)
	ImageRoot(id string) string
	Driver() graphdriver.Driver
}

type Image

type Image struct {
	ID              string            `json:"id"`
	Parent          string            `json:"parent,omitempty"`
	Comment         string            `json:"comment,omitempty"`
	Created         time.Time         `json:"created"`
	Container       string            `json:"container,omitempty"`
	ContainerConfig runconfig.Config  `json:"container_config,omitempty"`
	DockerVersion   string            `json:"docker_version,omitempty"`
	Author          string            `json:"author,omitempty"`
	Config          *runconfig.Config `json:"config,omitempty"`
	Architecture    string            `json:"architecture,omitempty"`
	OS              string            `json:"os,omitempty"`
	Checksum        string            `json:"checksum"`
	Size            int64
	// contains filtered or unexported fields
}

func LoadImage

func LoadImage(root string) (*Image, error)

func NewImgJSON

func NewImgJSON(src []byte) (*Image, error)

Build an Image object from raw json data

func (*Image) CheckDepth

func (img *Image) CheckDepth() error

CheckDepth returns an error if the depth of an image, as returned by ImageDepth, is too large to support creating a container from it on this daemon.

func (*Image) Depth

func (img *Image) Depth() (int, error)

Depth returns the number of parents for a current image

func (*Image) GetParent

func (img *Image) GetParent() (*Image, error)

func (*Image) GetParentsSize

func (img *Image) GetParentsSize(size int64) int64

func (*Image) History

func (img *Image) History() ([]*Image, error)

Image includes convenience proxy functions to its graph These functions will return an error if the image is not registered (ie. if image.graph == nil)

func (*Image) RawJson

func (img *Image) RawJson() ([]byte, error)

func (*Image) SaveSize

func (img *Image) SaveSize(root string) error

SaveSize stores the current `size` value of `img` in the directory `root`.

func (*Image) SetGraph

func (img *Image) SetGraph(graph Graph)

func (*Image) TarLayer

func (img *Image) TarLayer() (arch archive.Archive, err error)

TarLayer returns a tar archive of the image's filesystem layer.

func (*Image) WalkHistory

func (img *Image) WalkHistory(handler func(*Image) error) (err error)

Jump to

Keyboard shortcuts

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