image

package
v1.9.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2015 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeImageConfig added in v1.8.3

func MakeImageConfig(v1Compatibility []byte, layerID, parentID digest.Digest) ([]byte, error)

MakeImageConfig returns immutable configuration JSON for image based on the v1Compatibility object, layer digest and parent StrongID. SHA256() of this config is the new image ID (strongID).

func StrongID added in v1.8.3

func StrongID(configJSON []byte) (digest.Digest, error)

StrongID returns image ID for the config JSON.

func ValidateID added in v1.7.0

func ValidateID(id string) error

ValidateID checks whether an ID string is a valid image ID.

Types

type Descriptor added in v1.9.0

type Descriptor interface {
	ID() string
	Parent() string
	MarshalConfig() ([]byte, error)
}

Descriptor provides the information necessary to register an image in the graph.

type Image

type Image struct {
	// ID a unique 64 character identifier of the image
	ID string `json:"id,omitempty"`
	// Parent id of the image
	Parent string `json:"parent,omitempty"`
	// Comment user added comment
	Comment string `json:"comment,omitempty"`
	// Created timestamp when image was created
	Created time.Time `json:"created"`
	// Container is the id of the container used to commit
	Container string `json:"container,omitempty"`
	// ContainerConfig  is the configuration of the container that is committed into the image
	ContainerConfig runconfig.Config `json:"container_config,omitempty"`
	// DockerVersion specifies version on which image is built
	DockerVersion string `json:"docker_version,omitempty"`
	// Author of the image
	Author string `json:"author,omitempty"`
	// Config is the configuration of the container received from the client
	Config *runconfig.Config `json:"config,omitempty"`
	// Architecture is the hardware that the image is build and runs on
	Architecture string `json:"architecture,omitempty"`
	// OS is the operating system used to build and run the image
	OS string `json:"os,omitempty"`
	// Size is the total size of the image including all layers it is composed of
	Size int64 `json:",omitempty"` // capitalized for backwards compatibility
	// ParentID specifies the strong, content address of the parent configuration.
	ParentID digest.Digest `json:"parent_id,omitempty"`
	// LayerID provides the content address of the associated layer.
	LayerID digest.Digest `json:"layer_id,omitempty"`
}

Image stores the image configuration. All fields in this struct must be marked `omitempty` to keep getting predictable hashes from the old `v1Compatibility` configuration.

func NewImgJSON

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

NewImgJSON creates an Image configuration from json.

Jump to

Keyboard shortcuts

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