manifest

package
v5.30.2 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: Apache-2.0 Imports: 20 Imported by: 186

Documentation

Index

Constants

View Source
const (
	// DockerV2Schema1MediaType MIME type represents Docker manifest schema 1
	DockerV2Schema1MediaType = manifest.DockerV2Schema1MediaType
	// DockerV2Schema1SignedMediaType MIME type represents Docker manifest schema 1 with a JWS signature
	DockerV2Schema1SignedMediaType = manifest.DockerV2Schema1SignedMediaType
	// DockerV2Schema2MediaType MIME type represents Docker manifest schema 2
	DockerV2Schema2MediaType = manifest.DockerV2Schema2MediaType
	// DockerV2Schema2ConfigMediaType is the MIME type used for schema 2 config blobs.
	DockerV2Schema2ConfigMediaType = manifest.DockerV2Schema2ConfigMediaType
	// DockerV2Schema2LayerMediaType is the MIME type used for schema 2 layers.
	DockerV2Schema2LayerMediaType = manifest.DockerV2Schema2LayerMediaType
	// DockerV2SchemaLayerMediaTypeUncompressed is the mediaType used for uncompressed layers.
	DockerV2SchemaLayerMediaTypeUncompressed = manifest.DockerV2SchemaLayerMediaTypeUncompressed
	// DockerV2ListMediaType MIME type represents Docker manifest schema 2 list
	DockerV2ListMediaType = manifest.DockerV2ListMediaType
	// DockerV2Schema2ForeignLayerMediaType is the MIME type used for schema 2 foreign layers.
	DockerV2Schema2ForeignLayerMediaType = manifest.DockerV2Schema2ForeignLayerMediaType
	// DockerV2Schema2ForeignLayerMediaType is the MIME type used for gzipped schema 2 foreign layers.
	DockerV2Schema2ForeignLayerMediaTypeGzip = manifest.DockerV2Schema2ForeignLayerMediaTypeGzip
)

FIXME(runcom, mitr): should we have a mediatype pkg??

Variables

DefaultRequestedManifestMIMETypes is a list of MIME types a types.ImageSource should request from the backend unless directed otherwise.

View Source
var (
	// SupportedListMIMETypes is a list of the manifest list types that we know how to
	// read/manipulate/write.
	SupportedListMIMETypes = []string{
		DockerV2ListMediaType,
		imgspecv1.MediaTypeImageIndex,
	}
)

Functions

func AddDummyV2S1Signature

func AddDummyV2S1Signature(manifest []byte) ([]byte, error)

AddDummyV2S1Signature adds an JWS signature with a temporary key (i.e. useless) to a v2s1 manifest. This is useful to make the manifest acceptable to a docker/distribution registry (even though nothing needs or wants the JWS signature).

func BlobInfoFromOCI1Descriptor

func BlobInfoFromOCI1Descriptor(desc imgspecv1.Descriptor) types.BlobInfo

BlobInfoFromOCI1Descriptor returns a types.BlobInfo based on the input OCI1 descriptor.

func BlobInfoFromSchema2Descriptor

func BlobInfoFromSchema2Descriptor(desc Schema2Descriptor) types.BlobInfo

BlobInfoFromSchema2Descriptor returns a types.BlobInfo based on the input schema 2 descriptor.

func Digest

func Digest(manifestBlob []byte) (digest.Digest, error)

Digest returns the a digest of a docker manifest, with any necessary implied transformations like stripping v1s1 signatures.

func GuessMIMEType

func GuessMIMEType(manifestBlob []byte) string

GuessMIMEType guesses MIME type of a manifest and returns it _if it is recognized_, or "" if unknown or unrecognized. FIXME? We should, in general, prefer out-of-band MIME type instead of blindly parsing the manifest, but we may not have such metadata available (e.g. when the manifest is a local file).

func MIMETypeIsMultiImage

func MIMETypeIsMultiImage(mimeType string) bool

MIMETypeIsMultiImage returns true if mimeType is a list of images

func MIMETypeSupportsEncryption added in v5.1.0

func MIMETypeSupportsEncryption(mimeType string) bool

MIMETypeSupportsEncryption returns true if the mimeType supports encryption

func MatchesDigest

func MatchesDigest(manifestBlob []byte, expectedDigest digest.Digest) (bool, error)

MatchesDigest returns true iff the manifest matches expectedDigest. Error may be set if this returns false. Note that this is not doing ConstantTimeCompare; by the time we get here, the cryptographic signature must already have been verified, or we are not using a cryptographic channel and the attacker can modify the digest along with the manifest blob.

func NormalizedMIMEType

func NormalizedMIMEType(input string) string

NormalizedMIMEType returns the effective MIME type of a manifest MIME type returned by a server, centralizing various workarounds.

func SupportedOCI1MediaType deprecated

func SupportedOCI1MediaType(m string) error

SupportedOCI1MediaType checks if the specified string is a supported OCI1 media type.

Deprecated: blindly rejecting unknown MIME types when the consumer does not need to process the input just reduces interoperability (and violates the standard) with no benefit, and that this function does not check that the media type is appropriate for any specific purpose, so it’s not all that useful for validation anyway.

func SupportedSchema2MediaType

func SupportedSchema2MediaType(m string) error

SupportedSchema2MediaType checks if the specified string is a supported Docker v2s2 media type.

Types

type LayerInfo

type LayerInfo struct {
	types.BlobInfo
	EmptyLayer bool // The layer is an “empty”/“throwaway” one, and may or may not be physically represented in various transport / storage systems.  false if the manifest type does not have the concept.
}

LayerInfo is an extended version of types.BlobInfo for low-level users of Manifest.LayerInfos.

type List

type List = manifest.ListPublic

List is an interface for parsing, modifying lists of image manifests. Callers can either use this abstract interface without understanding the details of the formats, or instantiate a specific implementation (e.g. manifest.OCI1Index) and access the public members directly.

func ConvertListToMIMEType

func ConvertListToMIMEType(list List, manifestMIMEType string) (List, error)

ConvertListToMIMEType converts the passed-in manifest list to a manifest list of the specified type.

func ListFromBlob

func ListFromBlob(manifestBlob []byte, manifestMIMEType string) (List, error)

ListFromBlob parses a list of manifests.

type ListUpdate

type ListUpdate = manifest.ListUpdate

ListUpdate includes the fields which a List's UpdateInstances() method will modify.

type Manifest

type Manifest interface {
	// ConfigInfo returns a complete BlobInfo for the separate config object, or a BlobInfo{Digest:""} if there isn't a separate object.
	ConfigInfo() types.BlobInfo
	// LayerInfos returns a list of LayerInfos of layers referenced by this image, in order (the root layer first, and then successive layered layers).
	// The Digest field is guaranteed to be provided; Size may be -1.
	// WARNING: The list may contain duplicates, and they are semantically relevant.
	LayerInfos() []LayerInfo
	// UpdateLayerInfos replaces the original layers with the specified BlobInfos (size+digest+urls), in order (the root layer first, and then successive layered layers)
	UpdateLayerInfos(layerInfos []types.BlobInfo) error

	// ImageID computes an ID which can uniquely identify this image by its contents, irrespective
	// of which (of possibly more than one simultaneously valid) reference was used to locate the
	// image, and unchanged by whether or how the layers are compressed.  The result takes the form
	// of the hexadecimal portion of a digest.Digest.
	ImageID(diffIDs []digest.Digest) (string, error)

	// Inspect returns various information for (skopeo inspect) parsed from the manifest,
	// incorporating information from a configuration blob returned by configGetter, if
	// the underlying image format is expected to include a configuration blob.
	Inspect(configGetter func(types.BlobInfo) ([]byte, error)) (*types.ImageInspectInfo, error)

	// Serialize returns the manifest in a blob format.
	// NOTE: Serialize() does not in general reproduce the original blob if this object was loaded from one, even if no modifications were made!
	Serialize() ([]byte, error)
}

Manifest is an interface for parsing, modifying image manifests in isolation. Callers can either use this abstract interface without understanding the details of the formats, or instantiate a specific implementation (e.g. manifest.OCI1) and access the public members directly.

See types.Image for functionality not limited to manifests, including format conversions and config parsing. This interface is similar to, but not strictly equivalent to, the equivalent methods in types.Image.

func FromBlob

func FromBlob(manblob []byte, mt string) (Manifest, error)

FromBlob returns a Manifest instance for the specified manifest blob and the corresponding MIME type

type ManifestLayerCompressionIncompatibilityError added in v5.10.0

type ManifestLayerCompressionIncompatibilityError struct {
	// contains filtered or unexported fields
}

ManifestLayerCompressionIncompatibilityError indicates that a specified compression algorithm could not be applied to a layer MIME type. A caller that receives this should either retry the call with a different compression algorithm, or attempt to use a different manifest type.

func (ManifestLayerCompressionIncompatibilityError) Error added in v5.10.0

type NonImageArtifactError added in v5.22.0

type NonImageArtifactError = manifest.NonImageArtifactError

NonImageArtifactError (detected via errors.As) is used when asking for an image-specific operation on an object which is not a “container image” in the standard sense (e.g. an OCI artifact)

type OCI1

type OCI1 struct {
	imgspecv1.Manifest
}

OCI1 is a manifest.Manifest implementation for OCI images. The underlying data from imgspecv1.Manifest is also available.

func OCI1Clone

func OCI1Clone(src *OCI1) *OCI1

OCI1Clone creates a copy of the supplied OCI1 manifest.

func OCI1FromComponents

func OCI1FromComponents(config imgspecv1.Descriptor, layers []imgspecv1.Descriptor) *OCI1

OCI1FromComponents creates an OCI1 manifest instance from the supplied data.

func OCI1FromManifest

func OCI1FromManifest(manifestBlob []byte) (*OCI1, error)

OCI1FromManifest creates an OCI1 manifest instance from a manifest blob.

func (*OCI1) CanChangeLayerCompression added in v5.22.0

func (m *OCI1) CanChangeLayerCompression(mimeType string) bool

CanChangeLayerCompression returns true if we can compress/decompress layers with mimeType in the current image (and the code can handle that). NOTE: Even if this returns true, the relevant format might not accept all compression algorithms; the set of accepted algorithms depends not on the current format, but possibly on the target of a conversion.

func (*OCI1) ConfigInfo

func (m *OCI1) ConfigInfo() types.BlobInfo

ConfigInfo returns a complete BlobInfo for the separate config object, or a BlobInfo{Digest:""} if there isn't a separate object.

func (*OCI1) ImageID

func (m *OCI1) ImageID(diffIDs []digest.Digest) (string, error)

ImageID computes an ID which can uniquely identify this image by its contents.

func (*OCI1) Inspect

func (m *OCI1) Inspect(configGetter func(types.BlobInfo) ([]byte, error)) (*types.ImageInspectInfo, error)

Inspect returns various information for (skopeo inspect) parsed from the manifest and configuration.

func (*OCI1) LayerInfos

func (m *OCI1) LayerInfos() []LayerInfo

LayerInfos returns a list of LayerInfos of layers referenced by this image, in order (the root layer first, and then successive layered layers). The Digest field is guaranteed to be provided; Size may be -1. WARNING: The list may contain duplicates, and they are semantically relevant.

func (*OCI1) Serialize

func (m *OCI1) Serialize() ([]byte, error)

Serialize returns the manifest in a blob format. NOTE: Serialize() does not in general reproduce the original blob if this object was loaded from one, even if no modifications were made!

func (*OCI1) UpdateLayerInfos

func (m *OCI1) UpdateLayerInfos(layerInfos []types.BlobInfo) error

UpdateLayerInfos replaces the original layers with the specified BlobInfos (size+digest+urls+mediatype), in order (the root layer first, and then successive layered layers) The returned error will be a manifest.ManifestLayerCompressionIncompatibilityError if any of the layerInfos includes a combination of CompressionOperation and CompressionAlgorithm that isn't supported by OCI.

It’s generally the caller’s responsibility to determine whether a particular edit is acceptable, rather than relying on failures of this function, because the layer is typically created _before_ UpdateLayerInfos is called, because UpdateLayerInfos needs to know the final digest). See OCI1.CanChangeLayerCompression for some help in determining this; other aspects like compression algorithms that might not be supported by a format, or the limited set of MIME types accepted for encryption, are not currently handled — that logic should eventually also be provided as OCI1 methods, not hard-coded in callers.

type OCI1Index

type OCI1Index = manifest.OCI1IndexPublic

OCI1Index is just an alias for the OCI index type, but one which we can provide methods for.

func OCI1IndexClone

func OCI1IndexClone(index *OCI1Index) *OCI1Index

OCI1IndexClone creates a deep copy of the passed-in index.

func OCI1IndexFromComponents

func OCI1IndexFromComponents(components []imgspecv1.Descriptor, annotations map[string]string) *OCI1Index

OCI1IndexFromComponents creates an OCI1 image index instance from the supplied data.

func OCI1IndexFromManifest

func OCI1IndexFromManifest(manifestBlob []byte) (*OCI1Index, error)

OCI1IndexFromManifest creates an OCI1 manifest index instance from marshalled JSON, presumably generated by encoding a OCI1 manifest index.

type Schema1

type Schema1 struct {
	Name                     string                   `json:"name"`
	Tag                      string                   `json:"tag"`
	Architecture             string                   `json:"architecture"`
	FSLayers                 []Schema1FSLayers        `json:"fsLayers"`
	History                  []Schema1History         `json:"history"` // Keep this in sync with ExtractedV1Compatibility!
	ExtractedV1Compatibility []Schema1V1Compatibility `json:"-"`       // Keep this in sync with History! Does not contain the full config (Schema2V1Image)
	SchemaVersion            int                      `json:"schemaVersion"`
}

Schema1 is a manifest in docker/distribution schema 1.

func Schema1Clone

func Schema1Clone(src *Schema1) *Schema1

Schema1Clone creates a copy of the supplied Schema1 manifest.

func Schema1FromComponents

func Schema1FromComponents(ref reference.Named, fsLayers []Schema1FSLayers, history []Schema1History, architecture string) (*Schema1, error)

Schema1FromComponents creates an Schema1 manifest instance from the supplied data.

func Schema1FromManifest

func Schema1FromManifest(manifestBlob []byte) (*Schema1, error)

Schema1FromManifest creates a Schema1 manifest instance from a manifest blob. (NOTE: The instance is not necessary a literal representation of the original blob, layers with duplicate IDs are eliminated.)

func (*Schema1) ConfigInfo

func (m *Schema1) ConfigInfo() types.BlobInfo

ConfigInfo returns a complete BlobInfo for the separate config object, or a BlobInfo{Digest:""} if there isn't a separate object.

func (*Schema1) ImageID

func (m *Schema1) ImageID(diffIDs []digest.Digest) (string, error)

ImageID computes an ID which can uniquely identify this image by its contents.

func (*Schema1) Inspect

func (m *Schema1) Inspect(_ func(types.BlobInfo) ([]byte, error)) (*types.ImageInspectInfo, error)

Inspect returns various information for (skopeo inspect) parsed from the manifest and configuration.

func (*Schema1) LayerInfos

func (m *Schema1) LayerInfos() []LayerInfo

LayerInfos returns a list of LayerInfos of layers referenced by this image, in order (the root layer first, and then successive layered layers). The Digest field is guaranteed to be provided; Size may be -1. WARNING: The list may contain duplicates, and they are semantically relevant.

func (*Schema1) Serialize

func (m *Schema1) Serialize() ([]byte, error)

Serialize returns the manifest in a blob format. NOTE: Serialize() does not in general reproduce the original blob if this object was loaded from one, even if no modifications were made!

func (*Schema1) ToSchema2Config

func (m *Schema1) ToSchema2Config(diffIDs []digest.Digest) ([]byte, error)

ToSchema2Config builds a schema2-style configuration blob using the supplied diffIDs.

func (*Schema1) UpdateLayerInfos

func (m *Schema1) UpdateLayerInfos(layerInfos []types.BlobInfo) error

UpdateLayerInfos replaces the original layers with the specified BlobInfos (size+digest+urls), in order (the root layer first, and then successive layered layers)

type Schema1FSLayers

type Schema1FSLayers struct {
	BlobSum digest.Digest `json:"blobSum"`
}

Schema1FSLayers is an entry of the "fsLayers" array in docker/distribution schema 1.

type Schema1History

type Schema1History struct {
	V1Compatibility string `json:"v1Compatibility"`
}

Schema1History is an entry of the "history" array in docker/distribution schema 1.

type Schema1V1Compatibility

type Schema1V1Compatibility struct {
	ID              string                                `json:"id"`
	Parent          string                                `json:"parent,omitempty"`
	Comment         string                                `json:"comment,omitempty"`
	Created         time.Time                             `json:"created"`
	ContainerConfig schema1V1CompatibilityContainerConfig `json:"container_config,omitempty"`
	Author          string                                `json:"author,omitempty"`
	ThrowAway       bool                                  `json:"throwaway,omitempty"`
}

Schema1V1Compatibility is a v1Compatibility in docker/distribution schema 1.

type Schema2

type Schema2 struct {
	SchemaVersion     int                 `json:"schemaVersion"`
	MediaType         string              `json:"mediaType"`
	ConfigDescriptor  Schema2Descriptor   `json:"config"`
	LayersDescriptors []Schema2Descriptor `json:"layers"`
}

Schema2 is a manifest in docker/distribution schema 2.

func Schema2Clone

func Schema2Clone(src *Schema2) *Schema2

Schema2Clone creates a copy of the supplied Schema2 manifest.

func Schema2FromComponents

func Schema2FromComponents(config Schema2Descriptor, layers []Schema2Descriptor) *Schema2

Schema2FromComponents creates an Schema2 manifest instance from the supplied data.

func Schema2FromManifest

func Schema2FromManifest(manifestBlob []byte) (*Schema2, error)

Schema2FromManifest creates a Schema2 manifest instance from a manifest blob.

func (*Schema2) CanChangeLayerCompression added in v5.22.0

func (m *Schema2) CanChangeLayerCompression(mimeType string) bool

CanChangeLayerCompression returns true if we can compress/decompress layers with mimeType in the current image (and the code can handle that). NOTE: Even if this returns true, the relevant format might not accept all compression algorithms; the set of accepted algorithms depends not on the current format, but possibly on the target of a conversion.

func (*Schema2) ConfigInfo

func (m *Schema2) ConfigInfo() types.BlobInfo

ConfigInfo returns a complete BlobInfo for the separate config object, or a BlobInfo{Digest:""} if there isn't a separate object.

func (*Schema2) ImageID

func (m *Schema2) ImageID([]digest.Digest) (string, error)

ImageID computes an ID which can uniquely identify this image by its contents.

func (*Schema2) Inspect

func (m *Schema2) Inspect(configGetter func(types.BlobInfo) ([]byte, error)) (*types.ImageInspectInfo, error)

Inspect returns various information for (skopeo inspect) parsed from the manifest and configuration.

func (*Schema2) LayerInfos

func (m *Schema2) LayerInfos() []LayerInfo

LayerInfos returns a list of LayerInfos of layers referenced by this image, in order (the root layer first, and then successive layered layers). The Digest field is guaranteed to be provided; Size may be -1. WARNING: The list may contain duplicates, and they are semantically relevant.

func (*Schema2) Serialize

func (m *Schema2) Serialize() ([]byte, error)

Serialize returns the manifest in a blob format. NOTE: Serialize() does not in general reproduce the original blob if this object was loaded from one, even if no modifications were made!

func (*Schema2) UpdateLayerInfos

func (m *Schema2) UpdateLayerInfos(layerInfos []types.BlobInfo) error

UpdateLayerInfos replaces the original layers with the specified BlobInfos (size+digest+urls), in order (the root layer first, and then successive layered layers) The returned error will be a manifest.ManifestLayerCompressionIncompatibilityError if any of the layerInfos includes a combination of CompressionOperation and CompressionAlgorithm that would result in anything other than gzip compression.

type Schema2Config

type Schema2Config struct {
	Hostname        string               // Hostname
	Domainname      string               // Domainname
	User            string               // User that will run the command(s) inside the container, also support user:group
	AttachStdin     bool                 // Attach the standard input, makes possible user interaction
	AttachStdout    bool                 // Attach the standard output
	AttachStderr    bool                 // Attach the standard error
	ExposedPorts    Schema2PortSet       `json:",omitempty"` // List of exposed ports
	Tty             bool                 // Attach standard streams to a tty, including stdin if it is not closed.
	OpenStdin       bool                 // Open stdin
	StdinOnce       bool                 // If true, close stdin after the 1 attached client disconnects.
	Env             []string             // List of environment variable to set in the container
	Cmd             strslice.StrSlice    // Command to run when starting the container
	Healthcheck     *Schema2HealthConfig `json:",omitempty"` // Healthcheck describes how to check the container is healthy
	ArgsEscaped     bool                 `json:",omitempty"` // True if command is already escaped (Windows specific)
	Image           string               // Name of the image as it was passed by the operator (e.g. could be symbolic)
	Volumes         map[string]struct{}  // List of volumes (mounts) used for the container
	WorkingDir      string               // Current directory (PWD) in the command will be launched
	Entrypoint      strslice.StrSlice    // Entrypoint to run when starting the container
	NetworkDisabled bool                 `json:",omitempty"` // Is network disabled
	MacAddress      string               `json:",omitempty"` // Mac Address of the container
	OnBuild         []string             // ONBUILD metadata that were defined on the image Dockerfile
	Labels          map[string]string    // List of labels set to this container
	StopSignal      string               `json:",omitempty"` // Signal to stop a container
	StopTimeout     *int                 `json:",omitempty"` // Timeout (in seconds) to stop a container
	Shell           strslice.StrSlice    `json:",omitempty"` // Shell for shell-form of RUN, CMD, ENTRYPOINT
}

Schema2Config is a Config in docker/docker/api/types/container.

type Schema2Descriptor

type Schema2Descriptor = manifest.Schema2Descriptor

Schema2Descriptor is a “descriptor” in docker/distribution schema 2.

type Schema2HealthConfig

type Schema2HealthConfig struct {
	// Test is the test to perform to check that the container is healthy.
	// An empty slice means to inherit the default.
	// The options are:
	// {} : inherit healthcheck
	// {"NONE"} : disable healthcheck
	// {"CMD", args...} : exec arguments directly
	// {"CMD-SHELL", command} : run command with system's default shell
	Test []string `json:",omitempty"`

	// Zero means to inherit. Durations are expressed as integer nanoseconds.
	StartPeriod time.Duration `json:",omitempty"` // StartPeriod is the time to wait after starting before running the first check.
	Interval    time.Duration `json:",omitempty"` // Interval is the time to wait between checks.
	Timeout     time.Duration `json:",omitempty"` // Timeout is the time to wait before considering the check to have hung.

	// Retries is the number of consecutive failures needed to consider a container as unhealthy.
	// Zero means inherit.
	Retries int `json:",omitempty"`
}

Schema2HealthConfig is a HealthConfig, which holds configuration settings for the HEALTHCHECK feature, from docker/docker/api/types/container.

type Schema2History

type Schema2History struct {
	// Created is the timestamp at which the image was created
	Created time.Time `json:"created"`
	// Author is the name of the author that was specified when committing the image
	Author string `json:"author,omitempty"`
	// CreatedBy keeps the Dockerfile command used while building the image
	CreatedBy string `json:"created_by,omitempty"`
	// Comment is the commit message that was set when committing the image
	Comment string `json:"comment,omitempty"`
	// EmptyLayer is set to true if this history item did not generate a
	// layer. Otherwise, the history item is associated with the next
	// layer in the RootFS section.
	EmptyLayer bool `json:"empty_layer,omitempty"`
}

Schema2History stores build commands that were used to create an image, from docker/docker/image.

type Schema2Image

type Schema2Image struct {
	Schema2V1Image
	Parent     digest.Digest    `json:"parent,omitempty"`
	RootFS     *Schema2RootFS   `json:"rootfs,omitempty"`
	History    []Schema2History `json:"history,omitempty"`
	OSVersion  string           `json:"os.version,omitempty"`
	OSFeatures []string         `json:"os.features,omitempty"`
}

Schema2Image is an Image in docker/docker/image.

type Schema2List

type Schema2List = manifest.Schema2ListPublic

Schema2List is a list of platform-specific manifests.

func Schema2ListClone

func Schema2ListClone(list *Schema2List) *Schema2List

Schema2ListClone creates a deep copy of the passed-in list.

func Schema2ListFromComponents

func Schema2ListFromComponents(components []Schema2ManifestDescriptor) *Schema2List

Schema2ListFromComponents creates a Schema2 manifest list instance from the supplied data.

func Schema2ListFromManifest

func Schema2ListFromManifest(manifestBlob []byte) (*Schema2List, error)

Schema2ListFromManifest creates a Schema2 manifest list instance from marshalled JSON, presumably generated by encoding a Schema2 manifest list.

type Schema2ManifestDescriptor

type Schema2ManifestDescriptor = manifest.Schema2ManifestDescriptor

Schema2ManifestDescriptor references a platform-specific manifest.

type Schema2PlatformSpec

type Schema2PlatformSpec = manifest.Schema2PlatformSpec

Schema2PlatformSpec describes the platform which a particular manifest is specialized for.

type Schema2Port

type Schema2Port string

Schema2Port is a Port, a string containing port number and protocol in the format "80/tcp", from docker/go-connections/nat.

type Schema2PortSet

type Schema2PortSet map[Schema2Port]struct{}

Schema2PortSet is a PortSet, a collection of structs indexed by Port, from docker/go-connections/nat.

type Schema2RootFS

type Schema2RootFS struct {
	Type    string          `json:"type"`
	DiffIDs []digest.Digest `json:"diff_ids,omitempty"`
}

Schema2RootFS is a description of how to build up an image's root filesystem, from docker/docker/image.

type Schema2V1Image

type Schema2V1Image struct {
	// ID is a unique 64 character identifier of the image
	ID string `json:"id,omitempty"`
	// Parent is the ID of the parent image
	Parent string `json:"parent,omitempty"`
	// Comment is the commit message that was set when committing the image
	Comment string `json:"comment,omitempty"`
	// Created is the timestamp at which the 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 Schema2Config `json:"container_config,omitempty"`
	// DockerVersion specifies the version of Docker that was used to build the image
	DockerVersion string `json:"docker_version,omitempty"`
	// Author is the name of the author that was specified when committing the image
	Author string `json:"author,omitempty"`
	// Config is the configuration of the container received from the client
	Config *Schema2Config `json:"config,omitempty"`
	// Architecture is the hardware that the image is built and runs on
	Architecture string `json:"architecture,omitempty"`
	// Variant is a variant of the CPU that the image is built and runs on
	Variant string `json:"variant,omitempty"`
	// OS is the operating system used to built 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"`
}

Schema2V1Image is a V1Image in docker/docker/image.

Jump to

Keyboard shortcuts

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