Documentation ¶
Index ¶
- Variables
- func GetSystemContext(signaturePolicyPath, authFilePath string, forceCompress bool) *types.SystemContext
- type DockerRegistryOptions
- type Image
- func (i *Image) Created() time.Time
- func (i *Image) Decompose() error
- func (i *Image) Digest() digest.Digest
- func (i *Image) ID() string
- func (i *Image) MatchesID(id string) bool
- func (i *Image) Names() []string
- func (i *Image) PushImage(destination, manifestMIMEType, authFile, signaturePolicyPath string, ...) error
- func (i *Image) Remove(force bool) error
- func (i *Image) Size() (*uint64, error)
- func (i *Image) TagImage(tag string) error
- func (i *Image) TopLayer() string
- type Runtime
- type SigningOptions
Constants ¶
This section is empty.
Variables ¶
var ( // DockerArchive is the transport we prepend to an image name // when saving to docker-archive DockerArchive = dockerarchive.Transport.Name() // OCIArchive is the transport we prepend to an image name // when saving to oci-archive OCIArchive = ociarchive.Transport.Name() // DirTransport is the transport for pushing and pulling // images to and from a directory DirTransport = directory.Transport.Name() // TransportNames are the supported transports in string form TransportNames = [...]string{DefaultTransport, DockerArchive, OCIArchive, "ostree:", "dir:"} // TarballTransport is the transport for importing a tar archive // and creating a filesystem image TarballTransport = tarball.Transport.Name() // DockerTransport is the transport for docker registries DockerTransport = docker.Transport.Name() + "://" // AtomicTransport is the transport for atomic registries AtomicTransport = "atomic" // DefaultTransport is a prefix that we apply to an image name DefaultTransport = DockerTransport )
Functions ¶
func GetSystemContext ¶ added in v0.3.3
func GetSystemContext(signaturePolicyPath, authFilePath string, forceCompress bool) *types.SystemContext
GetSystemContext Constructs a new containers/image/types.SystemContext{} struct from the given signaturePolicy path
Types ¶
type DockerRegistryOptions ¶ added in v0.3.3
type DockerRegistryOptions struct { // DockerRegistryCreds is the user name and password to supply in case // we need to pull an image from a registry, and it requires us to // authenticate. DockerRegistryCreds *types.DockerAuthConfig // DockerCertPath is the location of a directory containing CA // certificates which will be used to verify the registry's certificate // (all files with names ending in ".crt"), and possibly client // certificates and private keys (pairs of files with the same name, // except for ".cert" and ".key" suffixes). DockerCertPath string // DockerInsecureSkipTLSVerify turns off verification of TLS // certificates and allows connecting to registries without encryption. DockerInsecureSkipTLSVerify bool }
DockerRegistryOptions encapsulates settings that affect how we connect or authenticate to a remote registry.
func (DockerRegistryOptions) GetSystemContext ¶ added in v0.3.3
func (o DockerRegistryOptions) GetSystemContext(signaturePolicyPath, authFile string, forceCompress bool) *types.SystemContext
GetSystemContext constructs a new system context from the given signaturePolicy path and the values in the DockerRegistryOptions
type Image ¶
type Image struct { inspect.ImageData InputName string Local bool // contains filtered or unexported fields }
Image is the primary struct for dealing with images It is still very much a work in progress
func (*Image) Digest ¶ added in v0.3.3
func (i *Image) Digest() digest.Digest
Digest returns the image's Manifest
func (*Image) MatchesID ¶ added in v0.3.3
MatchesID returns a bool based on if the input id matches the image's id
func (*Image) Names ¶ added in v0.3.3
Names returns a string array of names associated with the image
func (*Image) PushImage ¶ added in v0.3.3
func (i *Image) PushImage(destination, manifestMIMEType, authFile, signaturePolicyPath string, writer io.Writer, forceCompress bool, signingOptions SigningOptions, dockerRegistryOptions *DockerRegistryOptions) error
PushImage pushes the given image to a location described by the given path
func (*Image) Remove ¶
Remove an image; container removal for the image must be done outside the context of images
type Runtime ¶ added in v0.3.3
type Runtime struct {
// contains filtered or unexported fields
}
Runtime contains the store
func NewImageRuntime ¶ added in v0.3.3
func NewImageRuntime(options storage.StoreOptions) (*Runtime, error)
NewImageRuntime creates an Image Runtime including the store given store options
func (*Runtime) New ¶ added in v0.3.3
func (ir *Runtime) New(name, signaturePolicyPath, authfile string, writer io.Writer, dockeroptions *DockerRegistryOptions, signingoptions SigningOptions) (*Image, error)
New creates a new image object where the image could be local or remote
func (*Runtime) NewFromLocal ¶ added in v0.3.3
NewFromLocal creates a new image object that is intended to only deal with local images already in the store (or its aliases)
type SigningOptions ¶ added in v0.3.3
type SigningOptions struct { // RemoveSignatures directs us to remove any signatures which are already present. RemoveSignatures bool // SignBy is a key identifier of some kind, indicating that a signature should be generated using the specified private key and stored with the image. SignBy string }
SigningOptions encapsulates settings that control whether or not we strip or add signatures to images when writing them.