Skip to content

Commit

Permalink
add domainname spec entity
Browse files Browse the repository at this point in the history
add the domainname entity so that container runtimes can add special handling similar to hostname. The current workaround of adding a sysctl for kernel.domainname only works with rootful execution in most cases. This will allow for rootless execution.

Signed-off-by: Charlie Doern <cdoern@redhat.com>
  • Loading branch information
cdoern committed Aug 7, 2022
1 parent a8106e9 commit 5c5358f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions config.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,18 @@ For Windows based systems the user structure has the following fields:
"hostname": "mrsdalloway"
```

## <a name="configDomainname" />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"
```

## <a name="configPlatformSpecificConfiguration" />Platform-specific configuration

* **`linux`** (object, OPTIONAL) [Linux-specific configuration](config-linux.md).
Expand Down
1 change: 1 addition & 0 deletions schema/test/config/good/spec-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"readonly": true
},
"hostname": "slartibartfast",
"domainname": "foobarbaz.test",
"mounts": [
{
"destination": "/proc",
Expand Down
2 changes: 2 additions & 0 deletions specs-go/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 5c5358f

Please sign in to comment.