Struct oci_spec::image::ImageConfiguration [−][src]
pub struct ImageConfiguration {
pub created: Option<String>,
pub author: Option<String>,
pub architecture: String,
pub os: String,
pub os_version: Option<String>,
pub os_features: Option<Vec<String>>,
pub variant: Option<String>,
pub config: Option<Config>,
pub rootfs: RootFs,
pub history: Vec<History>,
}Expand description
The image configuration is associated with an image and describes some basic information about the image such as date created, author, as well as execution/runtime configuration like its entrypoint, default arguments, networking, and volumes.
Fields
created: Option<String>An combined date and time at which the image was created, formatted as defined by RFC 3339, section 5.6.
Gives the name and/or email address of the person or entity which created and is responsible for maintaining the image.
architecture: StringThe CPU architecture which the binaries in this image are built to run on. Configurations SHOULD use, and implementations SHOULD understand, values listed in the Go Language document for GOARCH.
os: StringThe name of the operating system which the image is built to run on. Configurations SHOULD use, and implementations SHOULD understand, values listed in the Go Language document for GOOS.
os_version: Option<String>This OPTIONAL property specifies the version of the operating system targeted by the referenced blob. Implementations MAY refuse to use manifests where os.version is not known to work with the host OS version. Valid values are implementation-defined. e.g. 10.0.14393.1066 on windows.
os_features: Option<Vec<String>>This OPTIONAL property specifies an array of strings, each specifying a mandatory OS feature. When os is windows, image indexes SHOULD use, and implementations SHOULD understand the following values:
- win32k: image requires win32k.sys on the host (Note: win32k.sys is missing on Nano Server)
variant: Option<String>The variant of the specified CPU architecture. Configurations SHOULD use, and implementations SHOULD understand, variant values listed in the Platform Variants table.
config: Option<Config>The execution parameters which SHOULD be used as a base when running a container using the image. This field can be None, in which case any execution parameters should be specified at creation of the container.
rootfs: RootFsThe rootfs key references the layer content addresses used by the image. This makes the image config hash depend on the filesystem hash.
history: Vec<History>Describes the history of each layer. The array is ordered from first to last.
Implementations
Attempts to load an image configuration.
Errors
This function will return an OciSpecError::Io if the image configuration does not exist or an OciSpecError::SerDe if it is invalid.
Example
use oci_spec::image::ImageConfiguration;
let image_config = ImageConfiguration::load("my-config.json").unwrap();Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for ImageConfiguration
impl Send for ImageConfiguration
impl Sync for ImageConfiguration
impl Unpin for ImageConfiguration
impl UnwindSafe for ImageConfiguration
Blanket Implementations
Mutably borrows from an owned value. Read more