Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddTarToLayer ¶
AddTarToLayer copies a tar file into a image directory and update its metadata
Types ¶
type Config ¶
type Config struct {
Hostname string
Domainname string
User string
AttachStdin bool
AttachStdout bool
AttachStderr bool
Tty bool
OpenStdin bool
StdinOnce bool
Env []string
Cmd []string
ArgsEscaped bool
Image string
Volumes interface{}
WorkingDir string
Entrypoint interface{}
OnBuild interface{}
Labels interface{}
}
Config represents a container configuration
type Description ¶
type Description struct {
Arch string `json:"architecture"`
Config Config `json:"config"`
Container string `json:"container"`
ContainerConfig Config `json:"container_config"`
Created string `json:"created"`
DockerVersion string `json:"docker_version"`
History []HistoryEntry `json:"history"`
OS string `json:"os"`
Rootfs Rootfs `json:"rootfs"`
}
Description represents the specification of a Docker image
func (*Description) AddLayer ¶
func (d *Description) AddLayer(newLayer *Layer)
AddLayer adds a new Layer to the image Description
func (*Description) Content ¶
func (d *Description) Content() ([]byte, error)
Content returns the description content
func (*Description) New ¶
func (d *Description) New(descriptionFile io.Reader) error
New generates a Description object based on the description file
func (*Description) ToLayer ¶
func (d *Description) ToLayer() (*Layer, error)
ToLayer returns the Description as a Layer
type HistoryEntry ¶
type HistoryEntry struct {
Created string `json:"created"`
CreatedBy string `json:"created_by,omitifempty"`
Comment string `json:"comment,omitifempty"`
EmptyLayer bool `json:"empty_layer,omitifempty"`
}
HistoryEntry represents a layer creation info
type Manifest ¶
type Manifest struct {
SchemaVersion int `json:"schemaVersion"`
MediaType string `json:"mediaType"`
Config layer `json:"config"`
Layers []layer `json:"layers"`
}
Manifest represent the manifest.json of an image
func (*Manifest) UpdateConfig ¶
UpdateConfig overrides the Config information of the manifest with a new Layer
Click to show internal directories.
Click to hide internal directories.