-
Notifications
You must be signed in to change notification settings - Fork 611
Expand file tree
/
Copy pathconfig-linux.md
More file actions
673 lines (534 loc) · 26.5 KB
/
config-linux.md
File metadata and controls
673 lines (534 loc) · 26.5 KB
Edit and raw actions
OlderNewer
1
# <a name="linuxContainerConfiguration" />Linux Container Configuration
2
3
This document describes the schema for the [Linux-specific section](config.md#platform-specific-configuration) of the [container configuration](config.md).
4
The Linux container specification uses various kernel features like namespaces, cgroups, capabilities, LSM, and filesystem jails to fulfill the spec.
5
6
## <a name="configLinuxDefaultFilesystems" />Default Filesystems
7
8
The Linux ABI includes both syscalls and several special file paths.
9
Applications expecting a Linux environment will very likely expect these file paths to be set up correctly.
10
11
The following filesystems SHOULD be made available in each container's filesystem:
12
13
| Path | Type |
14
| -------- | ------ |
15
| /proc | [proc][] |
16
| /sys | [sysfs][] |
17
| /dev/pts | [devpts][] |
18
| /dev/shm | [tmpfs][] |
19
20
## <a name="configLinuxNamespaces" />Namespaces
21
22
A namespace wraps a global system resource in an abstraction that makes it appear to the processes within the namespace that they have their own isolated instance of the global resource.
23
Changes to the global resource are visible to other processes that are members of the namespace, but are invisible to other processes.
24
For more information, see the [namespaces(7)][namespaces.7_2] man page.
25
26
Namespaces are specified as an array of entries inside the `namespaces` root field.
27
The following parameters can be specified to set up namespaces:
28
29
* **`type`** *(string, REQUIRED)* - namespace type. The following namespace types are supported:
30
* **`pid`** processes inside the container will only be able to see other processes inside the same container.
31
* **`network`** the container will have its own network stack.
32
* **`mount`** the container will have an isolated mount table.
33
* **`ipc`** processes inside the container will only be able to communicate to other processes inside the same container via system level IPC.
34
* **`uts`** the container will be able to have its own hostname and domain name.
35
* **`user`** the container will be able to remap user and group IDs from the host to local users and groups within the container.
36
* **`cgroup`** the container will have an isolated view of the cgroup hierarchy.
37
38
* **`path`** *(string, OPTIONAL)* - namespace file.
39
This value MUST be an absolute path in the [runtime mount namespace](glossary.md#runtime-namespace).
40
The runtime MUST place the container process in the namespace associated with that `path`.
41
The runtime MUST [generate an error](runtime.md#errors) if `path` is not associated with a namespace of type `type`.
42
43
If `path` is not specified, the runtime MUST create a new [container namespace](glossary.md#container-namespace) of type `type`.
44
45
If a namespace type is not specified in the `namespaces` array, the container MUST inherit the [runtime namespace](glossary.md#runtime-namespace) of that type.
46
If a `namespaces` field contains duplicated namespaces with same `type`, the runtime MUST [generate an error](runtime.md#errors).
47
48
### Example
49
50
```json
51
"namespaces": [
52
{
53
"type": "pid",
54
"path": "/proc/1234/ns/pid"
55
},
56
{
57
"type": "network",
58
"path": "/var/run/netns/neta"
59
},
60
{
61
"type": "mount"
62
},
63
{
64
"type": "ipc"
65
},
66
{
67
"type": "uts"
68
},
69
{
70
"type": "user"
71
},
72
{
73
"type": "cgroup"
74
}
75
]
76
```
77
78
## <a name="configLinuxUserNamespaceMappings" />User namespace mappings
79
80
**`uidMappings`** (array of objects, OPTIONAL) describes the user namespace uid mappings from the host to the container.
81
**`gidMappings`** (array of objects, OPTIONAL) describes the user namespace gid mappings from the host to the container.
82
83
Each entry has the following structure:
84
85
* **`hostID`** *(uint32, REQUIRED)* - is the starting uid/gid on the host to be mapped to *containerID*.
86
* **`containerID`** *(uint32, REQUIRED)* - is the starting uid/gid in the container.
87
* **`size`** *(uint32, REQUIRED)* - is the number of ids to be mapped.
88
89
The runtime SHOULD NOT modify the ownership of referenced filesystems to realize the mapping.
90
Note that the number of mapping entries MAY be limited by the [kernel][user-namespaces].
91
92
### Example
93
94
```json
95
"uidMappings": [
96
{
97
"hostID": 1000,
98
"containerID": 0,
99
"size": 32000
100
}
101
],
102
"gidMappings": [
103
{
104
"hostID": 1000,
105
"containerID": 0,
106
"size": 32000
107
}
108
]
109
```
110
111
## <a name="configLinuxDevices" />Devices
112
113
**`devices`** (array of objects, OPTIONAL) lists devices that MUST be available in the container.
114
The runtime MAY supply them however it likes (with [`mknod`][mknod.2], by bind mounting from the runtime mount namespace, using symlinks, etc.).
115
116
Each entry has the following structure:
117
118
* **`type`** *(string, REQUIRED)* - type of device: `c`, `b`, `u` or `p`.
119
More info in [mknod(1)][mknod.1].
120
* **`path`** *(string, REQUIRED)* - full path to device inside container.
121
If a [file][] already exists at `path` that does not match the requested device, the runtime MUST generate an error.
122
* **`major, minor`** *(int64, REQUIRED unless `type` is `p`)* - [major, minor numbers][devices] for the device.
123
* **`fileMode`** *(uint32, OPTIONAL)* - file mode for the device.
124
You can also control access to devices [with cgroups](#device-whitelist).
125
* **`uid`** *(uint32, OPTIONAL)* - id of device owner.
126
* **`gid`** *(uint32, OPTIONAL)* - id of device group.
127
128
The same `type`, `major` and `minor` SHOULD NOT be used for multiple devices.
129
130
### Example
131
132
```json
133
"devices": [
134
{
135
"path": "/dev/fuse",
136
"type": "c",
137
"major": 10,
138
"minor": 229,
139
"fileMode": 438,
140
"uid": 0,
141
"gid": 0
142
},
143
{
144
"path": "/dev/sda",
145
"type": "b",
146
"major": 8,
147
"minor": 0,
148
"fileMode": 432,
149
"uid": 0,
150
"gid": 0
151
}
152
]
153
```
154
155
### <a name="configLinuxDefaultDevices" />Default Devices
156
157
In addition to any devices configured with this setting, the runtime MUST also supply:
158
159
* [`/dev/null`][null.4]
160
* [`/dev/zero`][zero.4]
161
* [`/dev/full`][full.4]
162
* [`/dev/random`][random.4]
163
* [`/dev/urandom`][random.4]
164
* [`/dev/tty`][tty.4]
165
* [`/dev/console`][console.4] is set up if terminal is enabled in the config by bind mounting the pseudoterminal slave to /dev/console.
166
* [`/dev/ptmx`][pts.4].
167
A [bind-mount or symlink of the container's `/dev/pts/ptmx`][devpts].
168
169
## <a name="configLinuxControlGroups" />Control groups
170
171
Also known as cgroups, they are used to restrict resource usage for a container and handle device access.
172
cgroups provide controls (through controllers) to restrict cpu, memory, IO, pids and network for the container.
173
For more information, see the [kernel cgroups documentation][cgroup-v1].
174
175
### <a name="configLinuxCgroupsPath" />Cgroups Path
176
177
**`cgroupsPath`** (string, OPTIONAL) path to the cgroups.
178
It can be used to either control the cgroups hierarchy for containers or to run a new process in an existing container.
179
180
The value of `cgroupsPath` MUST be either an absolute path or a relative path.
181
* In the case of an absolute path (starting with `/`), the runtime MUST take the path to be relative to the cgroups mount point.
182
* In the case of a relative path (not starting with `/`), the runtime MAY interpret the path relative to a runtime-determined location in the cgroups hierarchy.
183
184
If the value is specified, the runtime MUST consistently attach to the same place in the cgroups hierarchy given the same value of `cgroupsPath`.
185
If the value is not specified, the runtime MAY define the default cgroups path.
186
Runtimes MAY consider certain `cgroupsPath` values to be invalid, and MUST generate an error if this is the case.
187
188
Implementations of the Spec can choose to name cgroups in any manner.
189
The Spec does not include naming schema for cgroups.
190
The Spec does not support per-controller paths for the reasons discussed in the [cgroupv2 documentation][cgroup-v2].
191
The cgroups will be created if they don't exist.
192
193
You can configure a container's cgroups via the `resources` field of the Linux configuration.
194
Do not specify `resources` unless limits have to be updated.
195
For example, to run a new process in an existing container without updating limits, `resources` need not be specified.
196
197
Runtimes MAY attach the container process to additional cgroup controllers beyond those necessary to fulfill the `resources` settings.
198
199
### Example
200
201
```json
202
"cgroupsPath": "/myRuntime/myContainer",
203
"resources": {
204
"memory": {
205
"limit": 100000,
206
"reservation": 200000
207
},
208
"devices": [
209
{
210
"allow": false,
211
"access": "rwm"
212
}
213
]
214
}
215
```
216
217
### <a name="configLinuxDeviceWhitelist" />Device whitelist
218
219
**`devices`** (array of objects, OPTIONAL) configures the [device whitelist][cgroup-v1-devices].
220
The runtime MUST apply entries in the listed order.
221
222
Each entry has the following structure:
223
224
* **`allow`** *(boolean, REQUIRED)* - whether the entry is allowed or denied.
225
* **`type`** *(string, OPTIONAL)* - type of device: `a` (all), `c` (char), or `b` (block).
226
Unset values mean "all", mapping to `a`.
227
* **`major, minor`** *(int64, OPTIONAL)* - [major, minor numbers][devices] for the device.
228
Unset values mean "all", mapping to [`*` in the filesystem API][cgroup-v1-devices].
229
* **`access`** *(string, OPTIONAL)* - cgroup permissions for device.
230
A composition of `r` (read), `w` (write), and `m` (mknod).
231
232
#### Example
233
234
```json
235
"devices": [
236
{
237
"allow": false,
238
"access": "rwm"
239
},
240
{
241
"allow": true,
242
"type": "c",
243
"major": 10,
244
"minor": 229,
245
"access": "rw"
246
},
247
{
248
"allow": true,
249
"type": "b",
250
"major": 8,
251
"minor": 0,
252
"access": "r"
253
}
254
]
255
```
256
257
### <a name="configLinuxMemory" />Memory
258
259
**`memory`** (object, OPTIONAL) represents the cgroup subsystem `memory` and it's used to set limits on the container's memory usage.
260
For more information, see the kernel cgroups documentation about [memory][cgroup-v1-memory].
261
262
Values for memory specify the limit in bytes, or `-1` for unlimited memory.
263
264
* **`limit`** *(int64, OPTIONAL)* - sets limit of memory usage
265
* **`reservation`** *(int64, OPTIONAL)* - sets soft limit of memory usage
266
* **`swap`** *(int64, OPTIONAL)* - sets limit of memory+Swap usage
267
* **`kernel`** *(int64, OPTIONAL)* - sets hard limit for kernel memory
268
* **`kernelTCP`** *(int64, OPTIONAL)* - sets hard limit for kernel TCP buffer memory
269
270
The following properties do not specify memory limits, but are covered by the `memory` controller:
271
272
* **`swappiness`** *(uint64, OPTIONAL)* - sets swappiness parameter of vmscan (See sysctl's vm.swappiness)
273
The values are from 0 to 100. Higher means more swappy.
274
* **`disableOOMKiller`** *(bool, OPTIONAL)* - enables or disables the OOM killer.
275
If enabled (`false`), tasks that attempt to consume more memory than they are allowed are immediately killed by the OOM killer.
276
The OOM killer is enabled by default in every cgroup using the `memory` subsystem.
277
To disable it, specify a value of `true`.
278
279
#### Example
280
281
```json
282
"memory": {
283
"limit": 536870912,
284
"reservation": 536870912,
285
"swap": 536870912,
286
"kernel": -1,
287
"kernelTCP": -1,
288
"swappiness": 0,
289
"disableOOMKiller": false
290
}
291
```
292
293
### <a name="configLinuxCPU" />CPU
294
295
**`cpu`** (object, OPTIONAL) represents the cgroup subsystems `cpu` and `cpusets`.
296
For more information, see the kernel cgroups documentation about [cpusets][cgroup-v1-cpusets].
297
298
The following parameters can be specified to set up the controller:
299
300
* **`shares`** *(uint64, OPTIONAL)* - specifies a relative share of CPU time available to the tasks in a cgroup
301
* **`quota`** *(int64, OPTIONAL)* - specifies the total amount of time in microseconds for which all tasks in a cgroup can run during one period (as defined by **`period`** below)
302
* **`period`** *(uint64, OPTIONAL)* - specifies a period of time in microseconds for how regularly a cgroup's access to CPU resources should be reallocated (CFS scheduler only)
303
* **`realtimeRuntime`** *(int64, OPTIONAL)* - specifies a period of time in microseconds for the longest continuous period in which the tasks in a cgroup have access to CPU resources
304
* **`realtimePeriod`** *(uint64, OPTIONAL)* - same as **`period`** but applies to realtime scheduler only
305
* **`cpus`** *(string, OPTIONAL)* - list of CPUs the container will run in
306
* **`mems`** *(string, OPTIONAL)* - list of Memory Nodes the container will run in
307
308
#### Example
309
310
```json
311
"cpu": {
312
"shares": 1024,
313
"quota": 1000000,
314
"period": 500000,
315
"realtimeRuntime": 950000,
316
"realtimePeriod": 1000000,
317
"cpus": "2-3",
318
"mems": "0-7"
319
}
320
```
321
322
### <a name="configLinuxBlockIO" />Block IO
323
324
**`blockIO`** (object, OPTIONAL) represents the cgroup subsystem `blkio` which implements the block IO controller.
325
For more information, see the kernel cgroups documentation about [blkio][cgroup-v1-blkio].
326
327
The following parameters can be specified to set up the controller:
328
329
* **`weight`** *(uint16, OPTIONAL)* - specifies per-cgroup weight. This is default weight of the group on all devices until and unless overridden by per-device rules.
330
* **`leafWeight`** *(uint16, OPTIONAL)* - equivalents of `weight` for the purpose of deciding how much weight tasks in the given cgroup has while competing with the cgroup's child cgroups.
331
* **`weightDevice`** *(array of objects, OPTIONAL)* - an array of per-device bandwidth weights.
332
Each entry has the following structure:
333
* **`major, minor`** *(int64, REQUIRED)* - major, minor numbers for device.
334
For more information, see the [mknod(1)][mknod.1] man page.
335
* **`weight`** *(uint16, OPTIONAL)* - bandwidth weight for the device.
336
* **`leafWeight`** *(uint16, OPTIONAL)* - bandwidth weight for the device while competing with the cgroup's child cgroups, CFQ scheduler only
337
338
You MUST specify at least one of `weight` or `leafWeight` in a given entry, and MAY specify both.
339
340
* **`throttleReadBpsDevice`**, **`throttleWriteBpsDevice`** *(array of objects, OPTIONAL)* - an array of per-device bandwidth rate limits.
341
Each entry has the following structure:
342
* **`major, minor`** *(int64, REQUIRED)* - major, minor numbers for device.
343
For more information, see the [mknod(1)][mknod.1] man page.
344
* **`rate`** *(uint64, REQUIRED)* - bandwidth rate limit in bytes per second for the device
345
346
* **`throttleReadIOPSDevice`**, **`throttleWriteIOPSDevice`** *(array of objects, OPTIONAL)* - an array of per-device IO rate limits.
347
Each entry has the following structure:
348
* **`major, minor`** *(int64, REQUIRED)* - major, minor numbers for device.
349
For more information, see the [mknod(1)][mknod.1] man page.
350
* **`rate`** *(uint64, REQUIRED)* - IO rate limit for the device
351
352
#### Example
353
354
```json
355
"blockIO": {
356
"weight": 10,
357
"leafWeight": 10,
358
"weightDevice": [
359
{
360
"major": 8,
361
"minor": 0,
362
"weight": 500,
363
"leafWeight": 300
364
},
365
{
366
"major": 8,
367
"minor": 16,
368
"weight": 500
369
}
370
],
371
"throttleReadBpsDevice": [
372
{
373
"major": 8,
374
"minor": 0,
375
"rate": 600
376
}
377
],
378
"throttleWriteIOPSDevice": [
379
{
380
"major": 8,
381
"minor": 16,
382
"rate": 300
383
}
384
]
385
}
386
```
387
388
### <a name="configLinuxHugePageLimits" />Huge page limits
389
390
**`hugepageLimits`** (array of objects, OPTIONAL) represents the `hugetlb` controller which allows to limit the
391
HugeTLB usage per control group and enforces the controller limit during page fault.
392
For more information, see the kernel cgroups documentation about [HugeTLB][cgroup-v1-hugetlb].
393
394
Each entry has the following structure:
395
396
* **`pageSize`** *(string, REQUIRED)* - hugepage size
397
* **`limit`** *(uint64, REQUIRED)* - limit in bytes of *hugepagesize* HugeTLB usage
398
399
#### Example
400
401
```json
402
"hugepageLimits": [
403
{
404
"pageSize": "2MB",
405
"limit": 209715200
406
}
407
]
408
```
409
410
### <a name="configLinuxNetwork" />Network
411
412
**`network`** (object, OPTIONAL) represents the cgroup subsystems `net_cls` and `net_prio`.
413
For more information, see the kernel cgroups documentations about [net\_cls cgroup][cgroup-v1-net-cls] and [net\_prio cgroup][cgroup-v1-net-prio].
414
415
The following parameters can be specified to set up the controller:
416
417
* **`classID`** *(uint32, OPTIONAL)* - is the network class identifier the cgroup's network packets will be tagged with
418
* **`priorities`** *(array of objects, OPTIONAL)* - specifies a list of objects of the priorities assigned to traffic originating from processes in the group and egressing the system on various interfaces.
419
The following parameters can be specified per-priority:
420
* **`name`** *(string, REQUIRED)* - interface name in [runtime network namespace](glossary.md#runtime-namespace)
421
* **`priority`** *(uint32, REQUIRED)* - priority applied to the interface
422
423
#### Example
424
425
```json
426
"network": {
427
"classID": 1048577,
428
"priorities": [
429
{
430
"name": "eth0",
431
"priority": 500
432
},
433
{
434
"name": "eth1",
435
"priority": 1000
436
}
437
]
438
}
439
```
440
441
### <a name="configLinuxPIDS" />PIDs
442
443
**`pids`** (object, OPTIONAL) represents the cgroup subsystem `pids`.
444
For more information, see the kernel cgroups documentation about [pids][cgroup-v1-pids].
445
446
The following parameters can be specified to set up the controller:
447
448
* **`limit`** *(int64, REQUIRED)* - specifies the maximum number of tasks in the cgroup
449
450
#### Example
451
452
```json
453
"pids": {
454
"limit": 32771
455
}
456
```
457
458
## <a name="configLinuxIntelRdt" />IntelRdt
459
460
**`intelRdt`** (object, OPTIONAL) represents the [Intel Resource Director Technology][intel-rdt-cat-kernel-interface].
461
If `intelRdt` is set, the runtime MUST write the container process ID to the `<container-id>/tasks` file in a mounted `resctrl` pseudo-filesystem, using the container ID from [`start`](runtime.md#start) and creating the `<container-id>` directory if necessary.
462
If no mounted `resctrl` pseudo-filesystem is available in the [runtime mount namespace](glossary.md#runtime-namespace), the runtime MUST [generate an error](runtime.md#errors).
463
464
If `intelRdt` is not set, the runtime MUST NOT manipulate any `resctrl` pseudo-filesystems.
465
466
The following parameters can be specified for the container:
467
468
* **`l3CacheSchema`** *(string, OPTIONAL)* - specifies the schema for L3 cache id and capacity bitmask (CBM).
469
If `l3CacheSchema` is set, runtimes MUST write the value to the `schemata` file in the `<container-id>` directory discussed in `intelRdt`.
470
471
If `l3CacheSchema` is not set, runtimes MUST NOT write to `schemata` files in any `resctrl` pseudo-filesystems.
472
473
### Example
474
475
Consider a two-socket machine with two L3 caches where the default CBM is 0xfffff and the max CBM length is 20 bits.
476
Tasks inside the container only have access to the "upper" 80% of L3 cache id 0 and the "lower" 50% L3 cache id 1:
477
478
```json
479
"linux": {
480
"intelRdt": {
481
"l3CacheSchema": "L3:0=ffff0;1=3ff"
482
}
483
}
484
```
485
486
## <a name="configLinuxSysctl" />Sysctl
487
488
**`sysctl`** (object, OPTIONAL) allows kernel parameters to be modified at runtime for the container.
489
For more information, see the [sysctl(8)][sysctl.8] man page.
490
491
### Example
492
493
```json
494
"sysctl": {
495
"net.ipv4.ip_forward": "1",
496
"net.core.somaxconn": "256"
497
}
498
```
499
500
## <a name="configLinuxSeccomp" />Seccomp
501
502
Seccomp provides application sandboxing mechanism in the Linux kernel.
503
Seccomp configuration allows one to configure actions to take for matched syscalls and furthermore also allows matching on values passed as arguments to syscalls.
504
For more information about Seccomp, see [Seccomp][seccomp] kernel documentation.
505
The actions, architectures, and operators are strings that match the definitions in seccomp.h from [libseccomp][] and are translated to corresponding values.
506
507
**`seccomp`** (object, OPTIONAL)
508
509
The following parameters can be specified to set up seccomp:
510
511
* **`defaultAction`** *(string, REQUIRED)* - the default action for seccomp. Allowed values are the same as `syscalls[].action`.
512
513
* **`architectures`** *(array of strings, OPTIONAL)* - the architecture used for system calls.
514
A valid list of constants as of libseccomp v2.3.2 is shown below.
515
516
* `SCMP_ARCH_X86`
517
* `SCMP_ARCH_X86_64`
518
* `SCMP_ARCH_X32`
519
* `SCMP_ARCH_ARM`
520
* `SCMP_ARCH_AARCH64`
521
* `SCMP_ARCH_MIPS`
522
* `SCMP_ARCH_MIPS64`
523
* `SCMP_ARCH_MIPS64N32`
524
* `SCMP_ARCH_MIPSEL`
525
* `SCMP_ARCH_MIPSEL64`
526
* `SCMP_ARCH_MIPSEL64N32`
527
* `SCMP_ARCH_PPC`
528
* `SCMP_ARCH_PPC64`
529
* `SCMP_ARCH_PPC64LE`
530
* `SCMP_ARCH_S390`
531
* `SCMP_ARCH_S390X`
532
* `SCMP_ARCH_PARISC`
533
* `SCMP_ARCH_PARISC64`
534
535
* **`syscalls`** *(array of objects, OPTIONAL)* - match a syscall in seccomp.
536
537
While this property is OPTIONAL, some values of `defaultAction` are not useful without `syscalls` entries.
538
For example, if `defaultAction` is `SCMP_ACT_KILL` and `syscalls` is empty or unset, the kernel will kill the container process on its first syscall.
539
540
Each entry has the following structure:
541
542
* **`names`** *(array of strings, REQUIRED)* - the names of the syscalls.
543
`names` MUST contain at least one entry.
544
* **`action`** *(string, REQUIRED)* - the action for seccomp rules.
545
A valid list of constants as of libseccomp v2.3.2 is shown below.
546
547
* `SCMP_ACT_KILL`
548
* `SCMP_ACT_TRAP`
549
* `SCMP_ACT_ERRNO`
550
* `SCMP_ACT_TRACE`
551
* `SCMP_ACT_ALLOW`
552
553
* **`args`** *(array of objects, OPTIONAL)* - the specific syscall in seccomp.
554
555
Each entry has the following structure:
556
557
* **`index`** *(uint, REQUIRED)* - the index for syscall arguments in seccomp.
558
* **`value`** *(uint64, REQUIRED)* - the value for syscall arguments in seccomp.
559
* **`valueTwo`** *(uint64, OPTIONAL)* - the value for syscall arguments in seccomp.
560
* **`op`** *(string, REQUIRED)* - the operator for syscall arguments in seccomp.
561
A valid list of constants as of libseccomp v2.3.2 is shown below.
562
563
* `SCMP_CMP_NE`
564
* `SCMP_CMP_LT`
565
* `SCMP_CMP_LE`
566
* `SCMP_CMP_EQ`
567
* `SCMP_CMP_GE`
568
* `SCMP_CMP_GT`
569
* `SCMP_CMP_MASKED_EQ`
570
571
### Example
572
573
```json
574
"seccomp": {
575
"defaultAction": "SCMP_ACT_ALLOW",
576
"architectures": [
577
"SCMP_ARCH_X86",
578
"SCMP_ARCH_X32"
579
],
580
"syscalls": [
581
{
582
"names": [
583
"getcwd",
584
"chmod"
585
],
586
"action": "SCMP_ACT_ERRNO"
587
}
588
]
589
}
590
```
591
592
## <a name="configLinuxRootfsMountPropagation" />Rootfs Mount Propagation
593
594
**`rootfsPropagation`** (string, OPTIONAL) sets the rootfs's mount propagation.
595
Its value is either slave, private, shared or unbindable.
596
The [Shared Subtrees][sharedsubtree] article in the kernel documentation has more information about mount propagation.
597
598
### Example
599
600
```json
601
"rootfsPropagation": "slave",
602
```
603
604
## <a name="configLinuxMaskedPaths" />Masked Paths
605
606
**`maskedPaths`** (array of strings, OPTIONAL) will mask over the provided paths inside the container so that they cannot be read.
607
The values MUST be absolute paths in the [container namespace](glossary.md#container_namespace).
608
609
### Example
610
611
```json
612
"maskedPaths": [
613
"/proc/kcore"
614
]
615
```
616
617
## <a name="configLinuxReadonlyPaths" />Readonly Paths
618
619
**`readonlyPaths`** (array of strings, OPTIONAL) will set the provided paths as readonly inside the container.
620
The values MUST be absolute paths in the [container namespace](glossary.md#container-namespace).
621
622
### Example
623
624
```json
625
"readonlyPaths": [
626
"/proc/sys"
627
]
628
```
629
630
## <a name="configLinuxMountLabel" />Mount Label
631
632
**`mountLabel`** (string, OPTIONAL) will set the Selinux context for the mounts in the container.
633
634
### Example
635
636
```json
637
"mountLabel": "system_u:object_r:svirt_sandbox_file_t:s0:c715,c811"
638
```
639
640
641
[cgroup-v1]: https://www.kernel.org/doc/Documentation/cgroup-v1/cgroups.txt
642
[cgroup-v1-blkio]: https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt
643
[cgroup-v1-cpusets]: https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt
644
[cgroup-v1-devices]: https://www.kernel.org/doc/Documentation/cgroup-v1/devices.txt
645
[cgroup-v1-hugetlb]: https://www.kernel.org/doc/Documentation/cgroup-v1/hugetlb.txt
646
[cgroup-v1-memory]: https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt
647
[cgroup-v1-net-cls]: https://www.kernel.org/doc/Documentation/cgroup-v1/net_cls.txt
648
[cgroup-v1-net-prio]: https://www.kernel.org/doc/Documentation/cgroup-v1/net_prio.txt
649
[cgroup-v1-pids]: https://www.kernel.org/doc/Documentation/cgroup-v1/pids.txt
650
[cgroup-v2]: https://www.kernel.org/doc/Documentation/cgroup-v2.txt
651
[devices]: https://www.kernel.org/doc/Documentation/admin-guide/devices.txt
652
[devpts]: https://www.kernel.org/doc/Documentation/filesystems/devpts.txt
653
[file]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_164
654
[libseccomp]: https://github.com/seccomp/libseccomp
655
[proc]: https://www.kernel.org/doc/Documentation/filesystems/proc.txt
656
[seccomp]: https://www.kernel.org/doc/Documentation/prctl/seccomp_filter.txt
657
[sharedsubtree]: https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt
658
[sysfs]: https://www.kernel.org/doc/Documentation/filesystems/sysfs.txt
659
[tmpfs]: https://www.kernel.org/doc/Documentation/filesystems/tmpfs.txt
660
661
[console.4]: http://man7.org/linux/man-pages/man4/console.4.html
662
[full.4]: http://man7.org/linux/man-pages/man4/full.4.html
663
[mknod.1]: http://man7.org/linux/man-pages/man1/mknod.1.html
664
[mknod.2]: http://man7.org/linux/man-pages/man2/mknod.2.html
665
[namespaces.7_2]: http://man7.org/linux/man-pages/man7/namespaces.7.html
666
[null.4]: http://man7.org/linux/man-pages/man4/null.4.html
667
[pts.4]: http://man7.org/linux/man-pages/man4/pts.4.html
668
[random.4]: http://man7.org/linux/man-pages/man4/random.4.html
669
[sysctl.8]: http://man7.org/linux/man-pages/man8/sysctl.8.html
670
[tty.4]: http://man7.org/linux/man-pages/man4/tty.4.html
671
[zero.4]: http://man7.org/linux/man-pages/man4/zero.4.html
672
[user-namespaces]: http://man7.org/linux/man-pages/man7/user_namespaces.7.html
673
[intel-rdt-cat-kernel-interface]: https://www.kernel.org/doc/Documentation/x86/intel_rdt_ui.txt