Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
AttachStderr bool
AttachStdin bool
AttachStdout bool
Cmd []string
Domainname string
Entrypoint []string
Env []string
Hostname string
Image string
Labels map[string]string
OnBuild []string
OpenStdin bool
StdinOnce bool
Tty bool
User string
Volumes map[string]struct{}
WorkingDir string
ExposedPorts map[string]struct{}
ArgsEscaped bool
NetworkDisabled bool
MacAddress string
StopSignal string
Shell []string
}
Config is a submessage of the config file described as:
The execution parameters which SHOULD be used as a base when running a container using the image.
The names of the fields in this message are chosen to reflect the JSON payload of the Config as defined here: https://git.io/vrAET and https://github.com/opencontainers/image-spec/blob/master/config.md
func (*Config) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.
func (*Config) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConfigFile ¶
type ConfigFile struct {
Architecture string `json:"architecture"`
Container string `json:"container"`
Created Time `json:"created"`
DockerVersion string `json:"docker_version"`
History []History `json:"history"`
OS string `json:"os"`
RootFS RootFS `json:"rootfs"`
Config Config `json:"config"`
ContainerConfig Config `json:"container_config"`
OSVersion string `json:"osversion"`
}
ConfigFile is the configuration file that holds the metadata describing how to launch a container. The names of the fields are chosen to reflect the JSON payload of the ConfigFile as defined here: https://git.io/vrAEY
func ParseConfigFile ¶
func ParseConfigFile(r io.Reader) (*ConfigFile, error)
ParseConfigFile parses the io.Reader's contents into a ConfigFile.
func (*ConfigFile) DeepCopy ¶
func (in *ConfigFile) DeepCopy() *ConfigFile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigFile.
func (*ConfigFile) DeepCopyInto ¶
func (in *ConfigFile) DeepCopyInto(out *ConfigFile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Descriptor ¶
type Descriptor struct {
MediaType types.MediaType `json:"mediaType"`
Size int64 `json:"size"`
Digest Hash `json:"digest"`
URLs []string `json:"urls,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
}
Descriptor holds a reference from the manifest to one of its constituent elements.
func (*Descriptor) DeepCopy ¶
func (in *Descriptor) DeepCopy() *Descriptor
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Descriptor.
func (*Descriptor) DeepCopyInto ¶
func (in *Descriptor) DeepCopyInto(out *Descriptor)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Hash ¶
type Hash struct {
// Algorithm holds the algorithm used to compute the hash.
Algorithm string
// Hex holds the hex portion of the content hash.
Hex string
}
Hash is an unqualified digest of some content, e.g. sha256:deadbeef
func NewHash ¶
NewHash validates the input string is a hash and returns a strongly type Hash object.
func (*Hash) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Hash.
func (*Hash) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Hash) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (*Hash) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
type History ¶
type History struct {
Author string `json:"author"`
Created Time `json:"created"`
CreatedBy string `json:"created_by"`
Comment string `json:"comment"`
EmptyLayer bool `json:"empty_layer,omitempty"`
}
History is one entry of a list recording how this container image was built.
func (*History) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new History.
func (*History) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Image ¶
type Image interface {
// Layers returns the ordered collection of filesystem layers that comprise this image.
// The order of the list is oldest/base layer first, and most-recent/top layer last.
Layers() ([]Layer, error)
// BlobSet returns an unordered collection of all the blobs in the image.
BlobSet() (map[Hash]struct{}, error)
// MediaType of this image's manifest.
MediaType() (types.MediaType, error)
// ConfigName returns the hash of the image's config file.
ConfigName() (Hash, error)
// ConfigFile returns this image's config file.
ConfigFile() (*ConfigFile, error)
// RawConfigFile returns the serialized bytes of ConfigFile()
RawConfigFile() ([]byte, error)
// Digest returns the sha256 of this image's manifest.
Digest() (Hash, error)
// Manifest returns this image's Manifest object.
Manifest() (*Manifest, error)
// RawManifest returns the serialized bytes of Manifest()
RawManifest() ([]byte, error)
// LayerByDigest returns a Layer for interacting with a particular layer of
// the image, looking it up by "digest" (the compressed hash).
LayerByDigest(Hash) (Layer, error)
// LayerByDiffID is an analog to LayerByDigest, looking up by "diff id"
// (the uncompressed hash).
LayerByDiffID(Hash) (Layer, error)
}
Image defines the interface for interacting with an OCI v1 image.
type Layer ¶
type Layer interface {
// Digest returns the Hash of the compressed layer.
Digest() (Hash, error)
// DiffID returns the Hash of the uncompressed layer.
DiffID() (Hash, error)
// Compressed returns an io.ReadCloser for the compressed layer contents.
Compressed() (io.ReadCloser, error)
// Uncompressed returns an io.ReadCloser for the uncompressed layer contents.
Uncompressed() (io.ReadCloser, error)
// Size returns the compressed size of the Layer.
Size() (int64, error)
}
Layer is an interface for accessing the properties of a particular layer of a v1.Image
type Manifest ¶
type Manifest struct {
SchemaVersion int64 `json:"schemaVersion"`
MediaType types.MediaType `json:"mediaType"`
Config Descriptor `json:"config"`
Layers []Descriptor `json:"layers"`
Annotations map[string]string `json:"annotations,omitempty"`
}
Manifest represents the OCI image manifest in a structured way.
func ParseManifest ¶
ParseManifest parses the io.Reader's contents into a Manifest.
func (*Manifest) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Manifest.
func (*Manifest) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RootFS ¶
RootFS holds the ordered list of file system deltas that comprise the container image's root filesystem.
func (*RootFS) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RootFS.
func (*RootFS) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Time ¶
Time is a wrapper around time.Time to help with deep copying
func (*Time) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Time.
func (*Time) DeepCopyInto ¶
DeepCopyInto creates a deep-copy of the Time value. The underlying time.Time type is effectively immutable in the time API, so it is safe to copy-by-assign, despite the presence of (unexported) Pointer fields.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package daemon provides facilities for reading/writing v1.Image from/to a running daemon.
|
Package daemon provides facilities for reading/writing v1.Image from/to a running daemon. |
|
Package empty provides an implementation of v1.Image equivalent to "FROM scratch".
|
Package empty provides an implementation of v1.Image equivalent to "FROM scratch". |
|
Package mutate provides facilities for mutating v1.Images of any kind.
|
Package mutate provides facilities for mutating v1.Images of any kind. |
|
Package partial defines methods for building up a v1.Image from minimal subsets that are sufficient for defining a v1.Image.
|
Package partial defines methods for building up a v1.Image from minimal subsets that are sufficient for defining a v1.Image. |
|
Package random provides a facility for synthesizing pseudo-random images.
|
Package random provides a facility for synthesizing pseudo-random images. |
|
Package remote provides facilities for reading/writing v1.Images from/to a remote image registry.
|
Package remote provides facilities for reading/writing v1.Images from/to a remote image registry. |
|
transport
Package transport provides facilities for setting up an authenticated http.RoundTripper given an Authenticator and base RoundTripper.
|
Package transport provides facilities for setting up an authenticated http.RoundTripper given an Authenticator and base RoundTripper. |
|
Package tarball provides facilities for reading/writing v1.Images from/to a tarball on-disk.
|
Package tarball provides facilities for reading/writing v1.Images from/to a tarball on-disk. |