Documentation
¶
Index ¶
- type Config
- type ContainerConfig
- type Export
- func (e *Export) ChildOf(parent string) *ExportedImage
- func (e *Export) Extract(r io.Reader) error
- func (e *Export) ExtractLayers() error
- func (e *Export) FirstFrom() *ExportedImage
- func (e *Export) FirstSquash() *ExportedImage
- func (e *Export) GetById(idPrefix string) (*ExportedImage, error)
- func (e *Export) InsertLayer(parent string) (*ExportedImage, error)
- func (e *Export) LastChild() *ExportedImage
- func (e *Export) PrintHistory()
- func (e *Export) RemoveExtractedLayers() error
- func (e *Export) ReplaceLayer(oldId string) (*ExportedImage, error)
- func (e *Export) Root() *ExportedImage
- func (e *Export) SquashLayers(to, from *ExportedImage) error
- func (e *Export) TarLayers(w io.Writer) error
- func (e *Export) WriteRepositoriesJson() error
- type ExportedImage
- type LayerConfig
- type Port
- type Squasher
- type TagInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Hostname string
Domainname string
User string
Memory int64
MemorySwap int64
AttachStdin bool
AttachStdout bool
AttachStderr bool
PortSpecs []string
ExposedPorts map[Port]struct{}
OnBuild []string
Tty bool
OpenStdin bool
StdinOnce bool
Env []string
Cmd []string
Dns []string // For Docker API v1.9 and below only
Image string
Volumes map[string]struct{}
VolumesFrom string
WorkingDir string
Entrypoint []string
NetworkDisabled bool
Labels map[string]string
}
type ContainerConfig ¶
type ContainerConfig struct {
Hostname string
Domainname string
Entrypoint []string
User string
Memory int64
MemorySwap int64
AttachStdin bool
AttachStdout bool
AttachStderr bool
PortSpecs []string
Tty bool
OpenStdin bool
StdinOnce bool
NetworkDisabled bool
OnBuild []string
Env []string
Cmd []string
Dns []string
Image string
Volumes map[string]struct{}
VolumesFrom string
Labels map[string]string
}
type Export ¶
type Export struct {
Entries map[string]*ExportedImage
Repositories map[string]*TagInfo
Path string
// contains filtered or unexported fields
}
func LoadExport ¶
func LoadExport(conf *configuration.Config, image, location string) (*Export, error)
LoadExport loads a tarball export created by docker save.
func (*Export) ChildOf ¶
func (e *Export) ChildOf(parent string) *ExportedImage
ChildOf returns the child layer or nil of the parent
func (*Export) ExtractLayers ¶
func (*Export) FirstFrom ¶
func (e *Export) FirstFrom() *ExportedImage
func (*Export) FirstSquash ¶
func (e *Export) FirstSquash() *ExportedImage
func (*Export) GetById ¶
func (e *Export) GetById(idPrefix string) (*ExportedImage, error)
GetById returns an ExportedImaged with a prefix matching ID. An error is returned multiple ExportedImages matched.
func (*Export) InsertLayer ¶
func (e *Export) InsertLayer(parent string) (*ExportedImage, error)
func (*Export) LastChild ¶
func (e *Export) LastChild() *ExportedImage
func (*Export) PrintHistory ¶
func (e *Export) PrintHistory()
func (*Export) RemoveExtractedLayers ¶
func (*Export) ReplaceLayer ¶
func (e *Export) ReplaceLayer(oldId string) (*ExportedImage, error)
func (*Export) Root ¶
func (e *Export) Root() *ExportedImage
Root returns the top layer in the export
func (*Export) SquashLayers ¶
func (e *Export) SquashLayers(to, from *ExportedImage) error
func (*Export) WriteRepositoriesJson ¶
type ExportedImage ¶
type ExportedImage struct {
Path string
JsonPath string
VersionPath string
LayerTarPath string
LayerDirPath string
LayerConfig *LayerConfig
}
func (*ExportedImage) CreateDirs ¶
func (e *ExportedImage) CreateDirs() error
func (*ExportedImage) ExtractLayerDir ¶
func (e *ExportedImage) ExtractLayerDir() error
func (*ExportedImage) RemoveLayerDir ¶
func (e *ExportedImage) RemoveLayerDir() error
func (*ExportedImage) TarLayer ¶
func (e *ExportedImage) TarLayer() error
func (*ExportedImage) WriteJson ¶
func (e *ExportedImage) WriteJson() error
func (*ExportedImage) WriteVersion ¶
func (e *ExportedImage) WriteVersion() error
type LayerConfig ¶
type LayerConfig struct {
Id string `json:"id"`
Parent string `json:"parent,omitempty"`
Comment string `json:"comment"`
Created time.Time `json:"created"`
V1ContainerConfig *ContainerConfig `json:"ContainerConfig,omitempty"` // Docker 1.0.0, 1.0.1
V2ContainerConfig *ContainerConfig `json:"container_config,omitempty"` // All other versions
Container string `json:"container"`
Config *Config `json:"config,omitempty"`
DockerVersion string `json:"docker_version"`
Architecture string `json:"architecture"`
}
func (*LayerConfig) ContainerConfig ¶
func (l *LayerConfig) ContainerConfig() *ContainerConfig
type Squasher ¶
type Squasher struct {
Conf *configuration.Config
}
Click to show internal directories.
Click to hide internal directories.