Skip to content

Commit c9c2574

Browse files
authored
Merge pull request opencontainers#526 from wking/optional-devices
config-linux: Make Linux 'devices' explicitly optional
2 parents 95a6ecf + 054d2df commit c9c2574

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

config-linux.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ There is a limit of 5 mappings which is the Linux kernel hard limit.
9898

9999
## Devices
100100

101-
`devices` is an array specifying the list of devices that MUST be available in the container.
101+
**`devices`** (array, optional) lists devices that MUST be available in the container.
102102
The runtime may supply them however it likes (with [mknod][mknod.2], by bind mounting from the runtime mount namespace, etc.).
103103

104104
The following parameters can be specified:
@@ -198,7 +198,7 @@ However, a runtime MAY attach the container process to additional cgroup control
198198

199199
#### Device whitelist
200200

201-
`devices` is an array of entries to control the [device whitelist][cgroup-v1-devices].
201+
**`devices`** (array, optional) configures the [device whitelist][cgroup-v1-devices].
202202
The runtime MUST apply entries in the listed order.
203203

204204
The following parameters can be specified:

specs-go/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,8 @@ type Network struct {
301301

302302
// Resources has container runtime resource constraints
303303
type Resources struct {
304-
// Devices are a list of device rules for the whitelist controller
305-
Devices []DeviceCgroup `json:"devices"`
304+
// Devices configures the device whitelist.
305+
Devices []DeviceCgroup `json:"devices,omitempty"`
306306
// DisableOOMKiller disables the OOM killer for out of memory conditions
307307
DisableOOMKiller *bool `json:"disableOOMKiller,omitempty"`
308308
// Specify an oom_score_adj for the container.

0 commit comments

Comments
 (0)