Documentation ¶
Index ¶
Constants ¶
const ( // MediaTypeDescriptor specifies the media type for a content descriptor. MediaTypeDescriptor = "application/vnd.oci.descriptor.v1+json" // MediaTypeImageManifest specifies the media type for an image manifest. MediaTypeImageManifest = "application/vnd.oci.image.manifest.v1+json" // MediaTypeImageManifestList specifies the media type for an image manifest list. MediaTypeImageManifestList = "application/vnd.oci.image.manifest.list.v1+json" // MediaTypeImageLayer is the media type used for layers referenced by the manifest. MediaTypeImageLayer = "application/vnd.oci.image.layer.v1.tar" // MediaTypeImageLayerGzip is the media type used for gzipped layers // referenced by the manifest. MediaTypeImageLayerGzip = "application/vnd.oci.image.layer.v1.tar+gzip" // MediaTypeImageLayerNonDistributable is the media type for layers referenced by // the manifest but with distribution restrictions. MediaTypeImageLayerNonDistributable = "application/vnd.oci.image.layer.nondistributable.v1.tar" // MediaTypeImageLayerNonDistributableGzip is the media type for // gzipped layers referenced by the manifest but with distribution // restrictions. MediaTypeImageLayerNonDistributableGzip = "application/vnd.oci.image.layer.nondistributable.v1.tar+gzip" // MediaTypeImageConfig specifies the media type for the image configuration. MediaTypeImageConfig = "application/vnd.oci.image.config.v1+json" )
const ImageLayoutVersion = "1.0.0"
ImageLayoutVersion is the version of ImageLayout
Variables ¶
var ( // RefsRegexp matches requirement of image-layout 'refs' charset. RefsRegexp = regexp.MustCompile(`^[a-zA-Z0-9-._]+$`) )
Functions ¶
This section is empty.
Types ¶
type Descriptor ¶ added in v1.0.0
type Descriptor struct { // MediaType is the media type of the object this schema refers to. MediaType string `json:"mediaType,omitempty"` // Digest is the digest of the targeted content. Digest digest.Digest `json:"digest"` // Size specifies the size in bytes of the blob. Size int64 `json:"size"` // URLs specifies a list of URLs from which this object MAY be downloaded URLs []string `json:"urls,omitempty"` }
Descriptor describes the disposition of targeted content. This structure provides `application/vnd.oci.descriptor.v1+json` mediatype when marshalled to JSON
type History ¶
type History struct { // Created is the combined date and time at which the layer was created, formatted as defined by RFC 3339, section 5.6. Created time.Time `json:"created,omitempty"` // CreatedBy is the command which created the layer. CreatedBy string `json:"created_by,omitempty"` // Author is the author of the build point. Author string `json:"author,omitempty"` // Comment is a custom message set when creating the layer. Comment string `json:"comment,omitempty"` // EmptyLayer is used to mark if the history item created a filesystem diff. EmptyLayer bool `json:"empty_layer,omitempty"` }
History describes the history of a layer.
type Image ¶
type Image struct { // Created is the combined date and time at which the image was created, formatted as defined by RFC 3339, section 5.6. Created time.Time `json:"created,omitempty"` // Author defines the name and/or email address of the person or entity which created and is responsible for maintaining the image. Author string `json:"author,omitempty"` // Architecture is the CPU architecture which the binaries in this image are built to run on. Architecture string `json:"architecture"` // OS is the name of the operating system which the image is built to run on. OS string `json:"os"` // Config defines the execution parameters which should be used as a base when running a container using the image. Config ImageConfig `json:"config,omitempty"` // RootFS references the layer content addresses used by the image. RootFS RootFS `json:"rootfs"` // History describes the history of each layer. History []History `json:"history,omitempty"` }
Image is the JSON structure which describes some basic information about the image. This provides the `application/vnd.oci.image.config.v1+json` mediatype when marshalled to JSON.
type ImageConfig ¶
type ImageConfig struct { // User defines the username or UID which the process in the container should run as. User string `json:"User,omitempty"` // ExposedPorts a set of ports to expose from a container running this image. ExposedPorts map[string]struct{} `json:"ExposedPorts,omitempty"` // Env is a list of environment variables to be used in a container. Env []string `json:"Env,omitempty"` // Entrypoint defines a list of arguments to use as the command to execute when the container starts. Entrypoint []string `json:"Entrypoint,omitempty"` // Cmd defines the default arguments to the entrypoint of the container. Cmd []string `json:"Cmd,omitempty"` // Volumes is a set of directories which should be created as data volumes in a container running this image. Volumes map[string]struct{} `json:"Volumes,omitempty"` // WorkingDir sets the current working directory of the entrypoint process in the container. WorkingDir string `json:"WorkingDir,omitempty"` // Labels contains arbitrary metadata for the container. Labels map[string]string `json:"labels,omitempty"` }
ImageConfig defines the execution parameters which should be used as a base when running a container using an image.
type ImageLayout ¶ added in v1.0.0
type ImageLayout struct {
Version string `json:"imageLayoutVersion"`
}
ImageLayout is the structure in the "oci-layout" file, found in the root of an OCI Image-layout directory.
type Manifest ¶
type Manifest struct { specs.Versioned // Config references a configuration object for a container, by digest. // The referenced configuration object is a JSON blob that the runtime uses to set up the container. Config Descriptor `json:"config"` // Layers is an indexed list of layers referenced by the manifest. Layers []Descriptor `json:"layers"` // Annotations contains arbitrary metadata for the manifest list. Annotations map[string]string `json:"annotations,omitempty"` }
Manifest provides `application/vnd.oci.image.manifest.list.v1+json` mediatype structure when marshalled to JSON.
type ManifestDescriptor ¶
type ManifestDescriptor struct { Descriptor // Platform describes the platform which the image in the manifest runs on. Platform Platform `json:"platform"` }
ManifestDescriptor describes a platform specific manifest.
type ManifestList ¶
type ManifestList struct { specs.Versioned // Manifests references platform specific manifests. Manifests []ManifestDescriptor `json:"manifests"` // Annotations contains arbitrary metadata for the manifest list. Annotations map[string]string `json:"annotations,omitempty"` }
ManifestList references manifests for various platforms. This structure provides `application/vnd.oci.image.manifest.list.v1+json` mediatype when marshalled to JSON.
type Platform ¶
type Platform struct { // Architecture field specifies the CPU architecture, for example // `amd64` or `ppc64`. Architecture string `json:"architecture"` // OS specifies the operating system, for example `linux` or `windows`. OS string `json:"os"` // OSVersion is an optional field specifying the operating system // version, for example `10.0.10586`. OSVersion string `json:"os.version,omitempty"` // OSFeatures is an optional field specifying an array of strings, // each listing a required OS feature (for example on Windows `win32k`). OSFeatures []string `json:"os.features,omitempty"` // Variant is an optional field specifying a variant of the CPU, for // example `ppc64le` to specify a little-endian version of a PowerPC CPU. Variant string `json:"variant,omitempty"` // Features is an optional field specifying an array of strings, each // listing a required CPU feature (for example `sse4` or `aes`). Features []string `json:"features,omitempty"` }
Platform describes the platform which the image in the manifest runs on.