v1

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MediaTypeDescriptor specifies the mediaType for a content descriptor.
	MediaTypeDescriptor = "application/vnd.oci.descriptor.v1+json"

	// MediaTypeImageManifest specifies the mediaType for an image manifest.
	MediaTypeImageManifest = "application/vnd.oci.image.manifest.v1+json"

	// MediaTypeImageManifestList specifies the mediaType for an image manifest list.
	MediaTypeImageManifestList = "application/vnd.oci.image.manifest.list.v1+json"

	// MediaTypeImageSerialization is the mediaType used for layers referenced by the manifest.
	MediaTypeImageSerialization = "application/vnd.oci.image.serialization.rootfs.tar.gzip"

	// MediaTypeImageSerializationConfig specifies the mediaType for the image configuration.
	MediaTypeImageSerializationConfig = "application/vnd.oci.image.serialization.config.v1+json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type History

type History struct {
	// Created is the creation time.
	Created string `json:"created"`

	// CreatedBy is the command which created the layer.
	CreatedBy string `json:"created_by"`

	// Author is the author of the build point.
	Author string `json:"author"`

	// Comment is a custom message set when creating the layer.
	Comment string `json:"comment"`

	// EmptyLayer is used to mark if the history item created a filesystem diff.
	EmptyLayer bool `json:"empty_layer"`
}

History describes the history of a layer.

type Image

type Image struct {
	// Created defines an ISO-8601 formatted combined date and time at which the image was created.
	Created string `json:"created"`

	// 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"`

	// 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"`

	// 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"`
}

Image is the JSON structure which describes some basic information about the image.

type ImageConfig

type ImageConfig struct {
	// User defines the username or UID which the process in the container should run as.
	User string `json:"User"`

	// Memory defines the memory limit.
	Memory int64 `json:"Memory"`

	// MemorySwap defines the total memory usage limit (memory + swap).
	MemorySwap int64 `json:"MemorySwap"`

	// CPUShares is the CPU shares (relative weight vs. other containers).
	CPUShares int64 `json:"CpuShares"`

	// ExposedPorts a set of ports to expose from a container running this image.
	ExposedPorts map[string]struct{} `json:"ExposedPorts"`

	// Env is a list of environment variables to be used in a container.
	Env []string `json:"Env"`

	// Entrypoint defines a list of arguments to use as the command to execute when the container starts.
	EntryPoint []string `json:"EntryPoint"`

	// Cmd defines the default arguments to the entrypoint of the container.
	Cmd []string `json:"Cmd"`

	// 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"`

	// WorkingDir sets the current working directory of the entrypoint process in the container.
	WorkingDir string `json:"WorkingDir"`
}

ImageConfig defines the execution parameters which should be used as a base when running a container using an image.

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 specs.Descriptor `json:"config"`

	// Layers is an indexed list of layers referenced by the manifest.
	Layers []specs.Descriptor `json:"layers"`

	// Annotations contains arbitrary metadata for the manifest list.
	Annotations map[string]string `json:"annotations"`
}

Manifest defines a schema2 manifest

type ManifestDescriptor

type ManifestDescriptor struct {
	specs.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"`
}

ManifestList references manifests for various platforms.

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.

type RootFS

type RootFS struct {
	// Type is the type of the rootfs.
	Type string `json:"type"`

	// DiffIDs is an array of layer content hashes (DiffIDs), in order from bottom-most to top-most.
	DiffIDs []string `json:"diff_ids"`
}

RootFS describes a layer content addresses

Jump to

Keyboard shortcuts

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