Skip to content

Commit 4916d73

Browse files
committed
Merge pull request #171 from gao-feng/update-runtime-config-linux-md
move the description of user ns mapping and default files to proper file
2 parents 4060e6c + 053f059 commit 4916d73

File tree

2 files changed

+30
-24
lines changed

2 files changed

+30
-24
lines changed

config-linux.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,6 @@ Valid values are the strings for capabilities defined in [the man page](http://m
1616
]
1717
```
1818

19-
## User namespace mappings
20-
21-
```json
22-
"uidMappings": [
23-
{
24-
"hostID": 1000,
25-
"containerID": 0,
26-
"size": 10
27-
}
28-
],
29-
"gidMappings": [
30-
{
31-
"hostID": 1000,
32-
"containerID": 0,
33-
"size": 10
34-
}
35-
]
36-
```
37-
38-
uid/gid mappings describe the user namespace mappings from the host to the container.
39-
The mappings represent how the bundle `rootfs` expects the user namespace to be setup and the runtime SHOULD NOT modify the permissions on the rootfs to realize the mapping.
40-
*hostID* is the starting uid/gid on the host to be mapped to *containerID* which is the starting uid/gid in the container and *size* refers to the number of ids to be mapped.
41-
There is a limit of 5 mappings which is the Linux kernel hard limit.
42-
4319
## Default Devices and File Systems
4420

4521
The Linux ABI includes both syscalls and several special file paths.

runtime-config-linux.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,32 @@ Also, when a path is specified, a runtime MUST assume that the setup for that pa
4949
]
5050
```
5151

52+
## User namespace mappings
53+
54+
###### Example
55+
56+
```json
57+
"uidMappings": [
58+
{
59+
"hostID": 1000,
60+
"containerID": 0,
61+
"size": 10
62+
}
63+
],
64+
"gidMappings": [
65+
{
66+
"hostID": 1000,
67+
"containerID": 0,
68+
"size": 10
69+
}
70+
]
71+
```
72+
73+
uid/gid mappings describe the user namespace mappings from the host to the container.
74+
The mappings represent how the bundle `rootfs` expects the user namespace to be setup and the runtime SHOULD NOT modify the permissions on the rootfs to realize the mapping.
75+
*hostID* is the starting uid/gid on the host to be mapped to *containerID* which is the starting uid/gid in the container and *size* refers to the number of ids to be mapped.
76+
There is a limit of 5 mappings which is the Linux kernel hard limit.
77+
5278
## Devices
5379

5480
`devices` is an array specifying the list of devices to be created in the container.
@@ -152,6 +178,8 @@ The Spec does not include naming schema for cgroups.
152178
The Spec does not support [split hierarchy](https://www.kernel.org/doc/Documentation/cgroups/unified-hierarchy.txt).
153179
The cgroups will be created if they don't exist.
154180

181+
###### Example
182+
155183
```json
156184
"cgroupsPath": "/myRuntime/myContainer"
157185
```
@@ -182,6 +210,8 @@ For more information, see [the memory cgroup man page](https://www.kernel.org/do
182210

183211
More information on `oom_score_adj` available [here](https://www.kernel.org/doc/Documentation/filesystems/proc.txt).
184212

213+
###### Example
214+
185215
```json
186216
"oomScoreAdj": 0
187217
```

0 commit comments

Comments
 (0)