pub struct Spec {
pub oci_version: String,
pub root: Option<Root>,
pub process: Option<Process>,
pub hostname: Option<String>,
pub domainname: Option<String>,
pub mounts: Vec<Mount>,
pub hooks: Option<Hooks>,
pub annotations: HashMap<String, String>,
pub linux: Option<Linux>,
}Expand description
OCI runtime configuration (config.json).
This is the main configuration structure that defines how a container should be created and run according to the OCI runtime specification.
Fields§
§oci_version: StringOCI specification version (SemVer 2.0.0 format).
REQUIRED field.
root: Option<Root>Container’s root filesystem.
process: Option<Process>Container process to run.
hostname: Option<String>Container hostname.
domainname: Option<String>Container domain name.
mounts: Vec<Mount>Additional mounts beyond the root filesystem.
hooks: Option<Hooks>Lifecycle hooks.
annotations: HashMap<String, String>Arbitrary metadata annotations.
linux: Option<Linux>Linux-specific configuration.
Implementations§
Source§impl Spec
impl Spec
Sourcepub fn default_linux() -> Self
pub fn default_linux() -> Self
Create a default spec for Linux containers.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Spec
impl<'de> Deserialize<'de> for Spec
Source§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
Auto Trait Implementations§
impl Freeze for Spec
impl RefUnwindSafe for Spec
impl Send for Spec
impl Sync for Spec
impl Unpin for Spec
impl UnsafeUnpin for Spec
impl UnwindSafe for Spec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more