Documentation ¶
Overview ¶
Package v1 defiles version 1 of OCI image-spec types
Index ¶
Constants ¶
This section is empty.
Variables ¶
var IndexSchemaVersion = oci.Versioned{
SchemaVersion: 2,
}
IndexSchemaVersion is a pre-configured versioned field for manifests
var ManifestSchemaVersion = oci.Versioned{
SchemaVersion: 2,
}
ManifestSchemaVersion is a pre-configured versioned field for manifests
Functions ¶
This section is empty.
Types ¶
type ArtifactManifest ¶ added in v0.4.3
type ArtifactManifest struct { // MediaType is the media type of the object this schema refers to. MediaType string `json:"mediaType"` // ArtifactType is the media type of the artifact this schema refers to. ArtifactType string `json:"artifactType,omitempty"` // Blobs is a collection of blobs referenced by this manifest. Blobs []types.Descriptor `json:"blobs,omitempty"` // Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest. Subject *types.Descriptor `json:"subject,omitempty"` // Annotations contains arbitrary metadata for the artifact manifest. Annotations map[string]string `json:"annotations,omitempty"` }
ArtifactManifest EXPERIMENTAL defines an OCI Artifact
type HealthConfig ¶ added in v0.5.1
type HealthConfig 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. 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. StartPeriod time.Duration `json:",omitempty"` // The start period for the container to initialize before the retries starts to count down. // Retries is the number of consecutive failures needed to consider a container as unhealthy. // Zero means inherit. Retries int `json:",omitempty"` }
HealthConfig holds configuration settings for the HEALTHCHECK feature. This is a Docker specific extension to the config, and not part of the OCI spec.
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"` // Platform describes the platform which the image in the manifest runs on. platform.Platform // 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 describing where the process is likely write data specific to a container instance. 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"` // StopSignal contains the system call signal that will be sent to the container to exit. StopSignal string `json:"StopSignal,omitempty"` // StopTimeout is the time in seconds to stop the container. // This is a Docker specific extension to the config, and not part of the OCI spec. StopTimeout *int `json:",omitempty"` // ArgsEscaped `[Deprecated]` - This field is present only for legacy // compatibility with Docker and should not be used by new image builders. // It is used by Docker for Windows images to indicate that the `Entrypoint` // or `Cmd` or both, contains only a single element array, that is a // pre-escaped, and combined into a single string `CommandLine`. If `true` // the value in `Entrypoint` or `Cmd` should be used as-is to avoid double // escaping. ArgsEscaped bool `json:"ArgsEscaped,omitempty"` // Healthcheck describes how to check if the container is healthy. // This is a Docker specific extension to the config, and not part of the OCI spec. Healthcheck *HealthConfig `json:"Healthcheck,omitempty"` // OnBuild lists any ONBUILD steps defined in the Dockerfile. // This is a Docker specific extension to the config, and not part of the OCI spec. OnBuild []string `json:"OnBuild,omitempty"` // Shell for the shell-form of RUN, CMD, and ENTRYPOINT. // This is a Docker specific extension to the config, and not part of the OCI spec. Shell []string `json:"Shell,omitempty"` }
ImageConfig defines the execution parameters which should be used as a base when running a container using an image.
type ImageLayout ¶
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 Index ¶
type Index struct { oci.Versioned // MediaType specifies the type of this document data structure e.g. `application/vnd.oci.image.index.v1+json` MediaType string `json:"mediaType,omitempty"` // ArtifactType specifies the IANA media type of artifact when the manifest is used for an artifact. ArtifactType string `json:"artifactType,omitempty"` // Manifests references platform specific manifests. Manifests []types.Descriptor `json:"manifests"` // Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest. Subject *types.Descriptor `json:"subject,omitempty"` // Annotations contains arbitrary metadata for the image index. Annotations map[string]string `json:"annotations,omitempty"` }
Index references manifests for various platforms. This structure provides `application/vnd.oci.image.index.v1+json` mediatype when marshalled to JSON.
type Manifest ¶
type Manifest struct { oci.Versioned // MediaType specifies the type of this document data structure e.g. `application/vnd.oci.image.manifest.v1+json` MediaType string `json:"mediaType,omitempty"` // ArtifactType specifies the IANA media type of artifact when the manifest is used for an artifact. ArtifactType string `json:"artifactType,omitempty"` // 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 types.Descriptor `json:"config"` // Layers is an indexed list of layers referenced by the manifest. Layers []types.Descriptor `json:"layers"` // Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest. Subject *types.Descriptor `json:"subject,omitempty"` // Annotations contains arbitrary metadata for the image manifest. Annotations map[string]string `json:"annotations,omitempty"` }
Manifest defines an OCI image