diff --git a/config.md b/config.md index fe28de69d..6862fe4f3 100644 --- a/config.md +++ b/config.md @@ -355,6 +355,18 @@ For Windows based systems the user structure has the following fields: "hostname": "mrsdalloway" ``` +## Domainname + +* **`domainname`** (string, OPTIONAL) specifies the container's domainname as seen by processes running inside the container. + On Linux, for example, this will change the domainname in the [container](glossary.md#container-namespace) [UTS namespace][uts-namespace.7]. + Depending on your [namespace configuration](config-linux.md#namespaces), the container UTS namespace may be the [runtime](glossary.md#runtime-namespace) [UTS namespace][uts-namespace.7]. + +### Example + +```json +"domainname": "foobarbaz.test" +``` + ## Platform-specific configuration * **`linux`** (object, OPTIONAL) [Linux-specific configuration](config-linux.md). diff --git a/schema/config-schema.json b/schema/config-schema.json index a4d1274fc..cf66c6524 100644 --- a/schema/config-schema.json +++ b/schema/config-schema.json @@ -35,6 +35,9 @@ "hostname": { "type": "string" }, + "domainname": { + "type": "string" + }, "mounts": { "type": "array", "items": { diff --git a/schema/test/config/good/spec-example.json b/schema/test/config/good/spec-example.json index a784d1d74..83e91dcd2 100644 --- a/schema/test/config/good/spec-example.json +++ b/schema/test/config/good/spec-example.json @@ -63,6 +63,7 @@ "readonly": true }, "hostname": "slartibartfast", + "domainname": "foobarbaz.test", "mounts": [ { "destination": "/proc", diff --git a/specs-go/config.go b/specs-go/config.go index cf1b338c8..7e9122103 100644 --- a/specs-go/config.go +++ b/specs-go/config.go @@ -12,6 +12,8 @@ type Spec struct { Root *Root `json:"root,omitempty"` // Hostname configures the container's hostname. Hostname string `json:"hostname,omitempty"` + // Domainname configures the container's domainname. + Domainname string `json:"domainname,omitempty"` // Mounts configures additional mounts (on top of Root). Mounts []Mount `json:"mounts,omitempty"` // Hooks configures callbacks for container lifecycle events.