diff --git a/src/runtime/mod.rs b/src/runtime/mod.rs index 027aefe875..7e55189a90 100644 --- a/src/runtime/mod.rs +++ b/src/runtime/mod.rs @@ -90,6 +90,15 @@ pub struct Spec { /// the container UTS namespace may be the runtime UTS namespace. hostname: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + /// Specifies the container's domainame as seen by processes running + /// inside the container. On Linux, for example, this will + /// change the domainame in the container [UTS namespace](http://man7.org/linux/man-pages/man7/namespaces.7.html). Depending on your + /// [namespace + /// configuration](https://github.com/opencontainers/runtime-spec/blob/master/config-linux.md#namespaces), + /// the container UTS namespace may be the runtime UTS namespace. + domainname: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] /// Hooks allow users to specify programs to run before or after various /// lifecycle events. Hooks MUST be called in the listed order. @@ -154,8 +163,8 @@ impl Default for Spec { version: String::from("1.0.2-dev"), process: Some(Default::default()), root: Some(Default::default()), - // Defaults hostname as youki hostname: "youki".to_string().into(), + domainname: None, mounts: get_default_mounts().into(), // Defaults to empty metadata annotations: Some(Default::default()),