Skip to content

Latest commit

 

History

History
673 lines (601 loc) · 21.3 KB

config.md

File metadata and controls

673 lines (601 loc) · 21.3 KB
 
Sep 25, 2015
Sep 25, 2015
1
# Container Configuration file
Jun 25, 2015
Jun 25, 2015
2
Aug 26, 2015
Aug 26, 2015
3
The container's top-level directory MUST contain a configuration file called `config.json`.
Mar 10, 2016
Mar 10, 2016
4
The canonical schema is defined in this document, but there is a JSON Schema in [`schema/schema.json`](schema/schema.json) and Go bindings in [`specs-go/config.go`](specs-go/config.go).
Jun 25, 2015
Jun 25, 2015
5
Jun 30, 2015
Jun 30, 2015
6
7
The configuration file contains metadata necessary to implement standard operations against the container.
This includes the process to run, environment variables to inject, sandboxing features to use, etc.
Jun 25, 2015
Jun 25, 2015
8
9
10
Below is a detailed description of each field defined in the configuration format.
Jan 15, 2016
Jan 15, 2016
11
## Specification version
Jun 25, 2015
Jun 25, 2015
12
Apr 28, 2016
Apr 28, 2016
13
* **`ociVersion`** (string, required) MUST be in [SemVer v2.0.0](http://semver.org/spec/v2.0.0.html) format and specifies the version of the OpenContainer specification with which the bundle complies.
Jan 15, 2016
Jan 15, 2016
14
15
16
The OpenContainer spec follows semantic versioning and retains forward and backward compatibility within major versions.
For example, if an implementation is compliant with version 1.0.1 of the spec, it is compatible with the complete 1.x series.
NOTE that there is no guarantee for forward or backward compatibility for version 0.x.
Jun 25, 2015
Jun 25, 2015
17
Apr 8, 2016
Apr 8, 2016
18
### Example
Jun 30, 2015
Jun 30, 2015
19
Jun 29, 2015
Jun 29, 2015
20
```json
Jan 15, 2016
Jan 15, 2016
21
"ociVersion": "0.1.0"
Jun 25, 2015
Jun 25, 2015
22
23
```
Jun 30, 2015
Jun 30, 2015
24
## Root Configuration
Jun 25, 2015
Jun 25, 2015
25
Jul 1, 2015
Jul 1, 2015
26
27
Each container has exactly one *root filesystem*, specified in the *root* object:
Apr 22, 2016
Apr 22, 2016
28
* **`path`** (string, required) Specifies the path to the root filesystem for the container. A directory MUST exist at the path declared by the field.
Sep 29, 2015
Sep 29, 2015
29
* **`readonly`** (bool, optional) If true then the root filesystem MUST be read-only inside the container. Defaults to false.
Jun 25, 2015
Jun 25, 2015
30
Apr 8, 2016
Apr 8, 2016
31
### Example
Jun 30, 2015
Jun 30, 2015
32
Jun 29, 2015
Jun 29, 2015
33
```json
Jun 30, 2015
Jun 30, 2015
34
35
36
37
"root": {
"path": "rootfs",
"readonly": true
}
Jun 25, 2015
Jun 25, 2015
38
39
```
Jan 27, 2016
Jan 27, 2016
40
## Mounts
Sep 3, 2015
Sep 3, 2015
41
Apr 28, 2016
Apr 28, 2016
42
You MAY add array of mount points inside container as `mounts`.
Sep 11, 2015
Sep 11, 2015
43
The runtime MUST mount entries in the listed order.
Jan 27, 2016
Jan 27, 2016
44
The parameters are similar to the ones in [the Linux mount system call](http://man7.org/linux/man-pages/man2/mount.2.html).
Sep 3, 2015
Sep 3, 2015
45
Jan 27, 2016
Jan 27, 2016
46
* **`destination`** (string, required) Destination of mount point: path inside container.
May 18, 2016
May 18, 2016
47
For the Windows operating system, one mount destination MUST NOT be nested within another mount. (Ex: c:\\foo and c:\\foo\\bar).
Jan 27, 2016
Jan 27, 2016
48
49
50
* **`type`** (string, required) Linux, *filesystemtype* argument supported by the kernel are listed in */proc/filesystems* (e.g., "minix", "ext2", "ext3", "jfs", "xfs", "reiserfs", "msdos", "proc", "nfs", "iso9660"). Windows: ntfs
* **`source`** (string, required) a device name, but can also be a directory name or a dummy. Windows, the volume name that is the target of the mount point. \\?\Volume\{GUID}\ (on Windows source is called target)
* **`options`** (list of strings, optional) in the fstab format [https://wiki.archlinux.org/index.php/Fstab](https://wiki.archlinux.org/index.php/Fstab).
Sep 3, 2015
Sep 3, 2015
51
Apr 8, 2016
Apr 8, 2016
52
### Example (Linux)
Sep 3, 2015
Sep 3, 2015
53
54
55
56
```json
"mounts": [
{
Jan 27, 2016
Jan 27, 2016
57
58
59
60
"destination": "/tmp",
"type": "tmpfs",
"source": "tmpfs",
"options": ["nosuid","strictatime","mode=755","size=65536k"]
Sep 3, 2015
Sep 3, 2015
61
62
},
{
Jan 27, 2016
Jan 27, 2016
63
64
65
66
"destination": "/data",
"type": "bind",
"source": "/volumes/testing",
"options": ["rbind","rw"]
Sep 3, 2015
Sep 3, 2015
67
68
69
70
}
]
```
Apr 8, 2016
Apr 8, 2016
71
### Example (Windows)
Jan 27, 2016
Jan 27, 2016
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
```json
"mounts": [
"myfancymountpoint": {
"destination": "C:\\Users\\crosbymichael\\My Fancy Mount Point\\",
"type": "ntfs",
"source": "\\\\?\\Volume\\{2eca078d-5cbc-43d3-aff8-7e8511f60d0e}\\",
"options": []
}
]
```
See links for details about [mountvol](http://ss64.com/nt/mountvol.html) and [SetVolumeMountPoint](https://msdn.microsoft.com/en-us/library/windows/desktop/aa365561(v=vs.85).aspx) in Windows.
Jul 1, 2015
Jul 1, 2015
87
## Process configuration
Jun 25, 2015
Jun 25, 2015
88
Sep 29, 2015
Sep 29, 2015
89
* **`terminal`** (bool, optional) specifies whether you want a terminal attached to that process. Defaults to false.
Jan 15, 2016
Jan 15, 2016
90
* **`cwd`** (string, required) is the working directory that will be set for the executable. This value MUST be an absolute path.
May 18, 2016
May 18, 2016
91
92
* **`env`** (array of strings, optional) contains a list of variables that will be set in the process's environment prior to execution. Elements in the array are specified as Strings in the form "KEY=value". The left hand side MUST consist solely of letters, digits, and underscores `_` as outlined in [IEEE Std 1003.1-2001](http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html).
* **`args`** (array of strings, required) executable to launch and any flags as an array. The executable is the first element and MUST be available at the given path inside of the rootfs. If the executable path is not an absolute path then the search $PATH is interpreted to find the executable.
Jun 25, 2015
Jun 25, 2015
93
Mar 10, 2016
Mar 10, 2016
94
For Linux-based systems the process structure supports the following process specific fields:
Mar 2, 2016
Mar 2, 2016
95
96
97
* **`capabilities`** (array of strings, optional) capabilities is an array that specifies Linux capabilities that can be provided to the process inside the container.
Valid values are the strings for capabilities defined in [the man page](http://man7.org/linux/man-pages/man7/capabilities.7.html)
Mar 10, 2016
Mar 10, 2016
98
99
100
* **`rlimits`** (array of rlimits, optional) rlimits is an array of rlimits that allows setting resource limits for a process inside the container.
The kernel enforces the `soft` limit for a resource while the `hard` limit acts as a ceiling for that value that could be set by an unprivileged process.
Valid values for the 'type' field are the resources defined in [the man page](http://man7.org/linux/man-pages/man2/setrlimit.2.html).
Mar 2, 2016
Mar 2, 2016
101
102
103
104
105
106
107
* **`apparmorProfile`** (string, optional) apparmor profile specifies the name of the apparmor profile that will be used for the container.
For more information about Apparmor, see [Apparmor documentation](https://wiki.ubuntu.com/AppArmor)
* **`selinuxLabel`** (string, optional) SELinux process label specifies the label with which the processes in a container are run.
For more information about SELinux, see [Selinux documentation](http://selinuxproject.org/page/Main_Page)
* **`noNewPrivileges`** (bool, optional) setting `noNewPrivileges` to true prevents the processes in the container from gaining additional privileges.
[The kernel doc](https://www.kernel.org/doc/Documentation/prctl/no_new_privs.txt) has more information on how this is achieved using a prctl system call.
Mar 17, 2016
Mar 17, 2016
108
109
### User
Jul 1, 2015
Jul 1, 2015
110
The user for the process is a platform-specific structure that allows specific control over which user the process runs as.
Mar 17, 2016
Mar 17, 2016
111
May 4, 2016
May 4, 2016
112
#### Linux and Solaris User
Mar 17, 2016
Mar 17, 2016
113
May 4, 2016
May 4, 2016
114
For Linux and Solaris based systems the user structure has the following fields:
Jun 30, 2015
Jun 30, 2015
115
Sep 29, 2015
Sep 29, 2015
116
117
118
* **`uid`** (int, required) specifies the user id.
* **`gid`** (int, required) specifies the group id.
* **`additionalGids`** (array of ints, optional) specifies additional group ids to be added to the process.
Jun 30, 2015
Jun 30, 2015
119
Mar 17, 2016
Mar 17, 2016
120
121
_Note: symbolic name for uid and gid, such as uname and gname respectively, are left to upper levels to derive (i.e. `/etc/passwd` parsing, NSS, etc)_
May 4, 2016
May 4, 2016
122
123
_Note: For Solaris, uid and gid specify the uid and gid of the process inside the container and need not be same as in the host._
Apr 8, 2016
Apr 8, 2016
124
### Example (Linux)
Jun 30, 2015
Jun 30, 2015
125
Jun 29, 2015
Jun 29, 2015
126
```json
Jun 30, 2015
Jun 30, 2015
127
128
"process": {
"terminal": true,
Jun 30, 2015
Jun 30, 2015
129
130
131
"user": {
"uid": 1,
"gid": 1,
Aug 29, 2015
Aug 29, 2015
132
"additionalGids": [5, 6]
Jun 30, 2015
Jun 30, 2015
133
},
Jun 30, 2015
Jun 30, 2015
134
135
136
137
"env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"TERM=xterm"
],
Aug 29, 2015
Aug 29, 2015
138
"cwd": "/root",
Jun 30, 2015
Jun 30, 2015
139
140
"args": [
"sh"
Mar 2, 2016
Mar 2, 2016
141
],
Mar 2, 2016
Mar 2, 2016
142
143
"apparmorProfile": "acme_secure_profile",
"selinuxLabel": "system_u:system_r:svirt_lxc_net_t:s0:c124,c675",
Mar 2, 2016
Mar 2, 2016
144
145
146
147
148
"noNewPrivileges": true,
"capabilities": [
"CAP_AUDIT_WRITE",
"CAP_KILL",
"CAP_NET_BIND_SERVICE"
Mar 10, 2016
Mar 10, 2016
149
150
151
152
153
154
155
],
"rlimits": [
{
"type": "RLIMIT_NOFILE",
"hard": 1024,
"soft": 1024
}
Jun 30, 2015
Jun 30, 2015
156
157
]
}
Jun 25, 2015
Jun 25, 2015
158
```
May 4, 2016
May 4, 2016
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
### Example (Solaris)
```json
"process": {
"terminal": true,
"user": {
"uid": 1,
"gid": 1,
"additionalGids": [2, 8]
},
"env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"TERM=xterm"
],
"cwd": "/root",
"args": [
"/usr/bin/bash"
],
}
```
Jun 25, 2015
Jun 25, 2015
179
180
Jun 30, 2015
Jun 30, 2015
181
## Hostname
Jun 25, 2015
Jun 25, 2015
182
Oct 6, 2015
Oct 6, 2015
183
* **`hostname`** (string, optional) as it is accessible to processes running inside. On Linux, you can only set this if your bundle creates a new [UTS namespace][uts-namespace].
Jun 25, 2015
Jun 25, 2015
184
Apr 8, 2016
Apr 8, 2016
185
### Example
Jun 30, 2015
Jun 30, 2015
186
Jun 29, 2015
Jun 29, 2015
187
```json
Jun 30, 2015
Jun 30, 2015
188
"hostname": "mrsdalloway"
Jun 25, 2015
Jun 25, 2015
189
190
```
May 2, 2016
May 2, 2016
191
## Platform
Jun 25, 2015
Jun 25, 2015
192
May 20, 2016
May 20, 2016
193
194
195
196
197
198
199
200
* **`os`** (string, required) specifies the operating system family this image targets.
The runtime MUST generate an error if it does not support the configured **`os`**.
Bundles SHOULD use, and runtimes SHOULD understand, **`os`** entries listed in the Go Language document for [`$GOOS`][go-environment].
If an operating system is not included in the `$GOOS` documentation, it SHOULD be submitted to this specification for standardization.
* **`arch`** (string, required) specifies the instruction set for which the binaries in the image have been compiled.
The runtime MUST generate an error if it does not support the configured **`arch`**.
Values for **`arch`** SHOULD use, and runtimes SHOULD understand, **`arch`** entries listed in the Go Language document for [`$GOARCH`][go-environment].
If an architecture is not included in the `$GOARCH` documentation, it SHOULD be submitted to this specification for standardization.
Jun 30, 2015
Jun 30, 2015
201
Apr 8, 2016
Apr 8, 2016
202
203
### Example
Jun 29, 2015
Jun 29, 2015
204
```json
Jun 30, 2015
Jun 30, 2015
205
206
207
208
"platform": {
"os": "linux",
"arch": "amd64"
}
Jun 25, 2015
Jun 25, 2015
209
210
```
May 2, 2016
May 2, 2016
211
212
213
214
215
## Platform-specific configuration
[**`platform.os`**](#platform) is used to lookup further platform-specific configuration.
* **`linux`** (object, optional) [Linux-specific configuration](config-linux.md).
May 23, 2016
May 23, 2016
216
This SHOULD only be set if **`platform.os`** is `linux`.
May 7, 2016
May 7, 2016
217
* **`solaris`** (object, optional) [Solaris-specific configuration](config-solaris.md).
May 23, 2016
May 23, 2016
218
This SHOULD only be set if **`platform.os`** is `solaris`.
May 2, 2016
May 2, 2016
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
### Example (Linux)
```json
{
"platform": {
"os": "linux",
"arch": "amd64"
},
"linux": {
"namespaces": [
{
"type": "pid"
}
]
}
}
```
Oct 6, 2015
Oct 6, 2015
237
Jan 27, 2016
Jan 27, 2016
238
239
240
241
242
243
244
245
246
247
248
249
250
## Hooks
Lifecycle hooks allow custom events for different points in a container's runtime.
Presently there are `Prestart`, `Poststart` and `Poststop`.
* [`Prestart`](#prestart) is a list of hooks to be run before the container process is executed
* [`Poststart`](#poststart) is a list of hooks to be run immediately after the container process is started
* [`Poststop`](#poststop) is a list of hooks to be run after the container process exits
Hooks allow one to run code before/after various lifecycle events of the container.
Hooks MUST be called in the listed order.
The state of the container is passed to the hooks over stdin, so the hooks could get the information they need to do their work.
Apr 30, 2016
Apr 30, 2016
251
Hook paths are absolute and are executed from the host's filesystem in the [runtime namespace][runtime-namespace].
Jan 27, 2016
Jan 27, 2016
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
### Prestart
The pre-start hooks are called after the container process is spawned, but before the user supplied command is executed.
They are called after the container namespaces are created on Linux, so they provide an opportunity to customize the container.
In Linux, for e.g., the network namespace could be configured in this hook.
If a hook returns a non-zero exit code, then an error including the exit code and the stderr is returned to the caller and the container is torn down.
### Poststart
The post-start hooks are called after the user process is started.
For example this hook can notify user that real process is spawned.
If a hook returns a non-zero exit code, then an error is logged and the remaining hooks are executed.
### Poststop
The post-stop hooks are called after the container process is stopped.
Cleanup or debugging could be performed in such a hook.
If a hook returns a non-zero exit code, then an error is logged and the remaining hooks are executed.
Apr 8, 2016
Apr 8, 2016
274
### Example
Jan 27, 2016
Jan 27, 2016
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
```json
"hooks" : {
"prestart": [
{
"path": "/usr/bin/fix-mounts",
"args": ["fix-mounts", "arg1", "arg2"],
"env": [ "key1=value1"]
},
{
"path": "/usr/bin/setup-network"
}
],
"poststart": [
{
Apr 11, 2016
Apr 11, 2016
290
"path": "/usr/bin/notify-start",
Mar 16, 2016
Mar 16, 2016
291
"timeout": 5
Jan 27, 2016
Jan 27, 2016
292
293
294
295
296
297
298
299
300
301
302
303
304
}
],
"poststop": [
{
"path": "/usr/sbin/cleanup.sh",
"args": ["cleanup.sh", "-f"]
}
]
}
```
`path` is required for a hook.
`args` and `env` are optional.
Mar 16, 2016
Mar 16, 2016
305
`timeout` is the number of seconds before aborting the hook.
Jan 27, 2016
Jan 27, 2016
306
307
The semantics are the same as `Path`, `Args` and `Env` in [golang Cmd](https://golang.org/pkg/os/exec/#Cmd).
Mar 9, 2016
Mar 9, 2016
308
309
## Annotations
Apr 27, 2016
Apr 27, 2016
310
This OPTIONAL property contains arbitrary metadata for the container.
May 23, 2016
May 23, 2016
311
This information MAY be structured or unstructured.
Mar 9, 2016
Mar 9, 2016
312
313
314
315
Annotations are key-value maps.
```json
"annotations": {
May 6, 2016
May 6, 2016
316
317
"key1" : "value1",
"key2" : "value2"
Mar 9, 2016
Mar 9, 2016
318
319
320
}
```
Mar 9, 2016
Mar 9, 2016
321
322
323
324
325
326
## Configuration Schema Example
Here is a full example `config.json` for reference.
```json
{
Apr 11, 2016
Apr 11, 2016
327
"ociVersion": "0.5.0-dev",
Mar 9, 2016
Mar 9, 2016
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
"platform": {
"os": "linux",
"arch": "amd64"
},
"process": {
"terminal": true,
"user": {
"uid": 1,
"gid": 1,
"additionalGids": [
5,
6
]
},
"args": [
"sh"
],
"env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"TERM=xterm"
],
"cwd": "/",
"capabilities": [
"CAP_AUDIT_WRITE",
"CAP_KILL",
"CAP_NET_BIND_SERVICE"
],
Mar 10, 2016
Mar 10, 2016
355
"rlimits": [
Apr 11, 2016
Apr 11, 2016
356
357
358
359
360
{
"type": "RLIMIT_CORE",
"hard": 1024,
"soft": 1024
},
Mar 10, 2016
Mar 10, 2016
361
362
363
364
365
366
{
"type": "RLIMIT_NOFILE",
"hard": 1024,
"soft": 1024
}
],
Apr 11, 2016
Apr 11, 2016
367
368
369
"apparmorProfile": "acme_secure_profile",
"selinuxLabel": "system_u:system_r:svirt_lxc_net_t:s0:c124,c675",
"noNewPrivileges": true
Mar 9, 2016
Mar 9, 2016
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
},
"root": {
"path": "rootfs",
"readonly": true
},
"hostname": "slartibartfast",
"mounts": [
{
"destination": "/proc",
"type": "proc",
"source": "proc"
},
{
"destination": "/dev",
"type": "tmpfs",
"source": "tmpfs",
"options": [
"nosuid",
"strictatime",
"mode=755",
"size=65536k"
]
},
{
"destination": "/dev/pts",
"type": "devpts",
"source": "devpts",
"options": [
"nosuid",
"noexec",
"newinstance",
"ptmxmode=0666",
"mode=0620",
"gid=5"
]
},
{
"destination": "/dev/shm",
"type": "tmpfs",
"source": "shm",
"options": [
"nosuid",
"noexec",
"nodev",
"mode=1777",
"size=65536k"
]
},
{
"destination": "/dev/mqueue",
"type": "mqueue",
"source": "mqueue",
"options": [
"nosuid",
"noexec",
"nodev"
]
},
{
"destination": "/sys",
"type": "sysfs",
"source": "sysfs",
"options": [
"nosuid",
"noexec",
"nodev"
]
},
{
"destination": "/sys/fs/cgroup",
"type": "cgroup",
"source": "cgroup",
"options": [
"nosuid",
"noexec",
"nodev",
"relatime",
"ro"
]
}
],
"hooks": {
"prestart": [
{
Apr 11, 2016
Apr 11, 2016
454
"path": "/usr/bin/fix-mounts",
Mar 9, 2016
Mar 9, 2016
455
"args": [
Apr 11, 2016
Apr 11, 2016
456
457
458
"fix-mounts",
"arg1",
"arg2"
Mar 9, 2016
Mar 9, 2016
459
],
Apr 11, 2016
Apr 11, 2016
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
"env": [
"key1=value1"
]
},
{
"path": "/usr/bin/setup-network"
}
],
"poststart": [
{
"path": "/usr/bin/notify-start",
"timeout": 5
}
],
"poststop": [
{
"path": "/usr/sbin/cleanup.sh",
"args": [
"cleanup.sh",
"-f"
]
Mar 9, 2016
Mar 9, 2016
481
482
483
484
}
]
},
"linux": {
Apr 11, 2016
Apr 11, 2016
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
"devices": [
{
"path": "/dev/fuse",
"type": "c",
"major": 10,
"minor": 229,
"fileMode": 438,
"uid": 0,
"gid": 0
},
{
"path": "/dev/sda",
"type": "b",
"major": 8,
"minor": 0,
"fileMode": 432,
"uid": 0,
"gid": 0
}
],
Apr 20, 2016
Apr 20, 2016
505
506
507
508
509
510
511
512
513
514
515
516
517
518
"uidMappings": [
{
"hostID": 1000,
"containerID": 0,
"size": 32000
}
],
"gidMappings": [
{
"hostID": 1000,
"containerID": 0,
"size": 32000
}
],
Apr 11, 2016
Apr 11, 2016
519
520
521
522
523
"sysctl": {
"net.ipv4.ip_forward": "1",
"net.core.somaxconn": "256"
},
"cgroupsPath": "/myRuntime/myContainer",
Mar 9, 2016
Mar 9, 2016
524
"resources": {
Apr 11, 2016
Apr 11, 2016
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
"network": {
"classID": 1048577,
"priorities": [
{
"name": "eth0",
"priority": 500
},
{
"name": "eth1",
"priority": 1000
}
]
},
"pids": {
"limit": 32771
},
"hugepageLimits": [
{
"pageSize": "2MB",
"limit": 9223372036854772000
}
],
"oomScoreAdj": 100,
"memory": {
"limit": 536870912,
"reservation": 536870912,
"swap": 536870912,
"kernel": 0,
"kernelTCP": 0,
"swappiness": 0
},
"cpu": {
"shares": 1024,
"quota": 1000000,
"period": 500000,
"realtimeRuntime": 950000,
"realtimePeriod": 1000000,
"cpus": "2-3",
"mems": "0-7"
},
"disableOOMKiller": false,
Mar 9, 2016
Mar 9, 2016
566
567
568
569
"devices": [
{
"allow": false,
"access": "rwm"
Apr 11, 2016
Apr 11, 2016
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
},
{
"allow": true,
"type": "c",
"major": 10,
"minor": 229,
"access": "rw"
},
{
"allow": true,
"type": "b",
"major": 8,
"minor": 0,
"access": "r"
}
],
"blockIO": {
"blkioWeight": 10,
"blkioLeafWeight": 10,
"blkioWeightDevice": [
{
"major": 8,
"minor": 0,
"weight": 500,
"leafWeight": 300
},
{
"major": 8,
"minor": 16,
"weight": 500
}
],
"blkioThrottleReadBpsDevice": [
{
"major": 8,
"minor": 0,
"rate": 600
}
],
"blkioThrottleWriteIOPSDevice": [
{
"major": 8,
"minor": 16,
"rate": 300
}
]
}
},
"rootfsPropagation": "slave",
"seccomp": {
"defaultAction": "SCMP_ACT_ALLOW",
"architectures": [
"SCMP_ARCH_X86"
],
"syscalls": [
{
"name": "getcwd",
"action": "SCMP_ACT_ERRNO"
Mar 9, 2016
Mar 9, 2016
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
}
]
},
"namespaces": [
{
"type": "pid"
},
{
"type": "network"
},
{
"type": "ipc"
},
{
"type": "uts"
},
{
"type": "mount"
}
Apr 11, 2016
Apr 11, 2016
647
648
649
650
651
652
653
654
655
656
657
658
659
660
],
"maskedPaths": [
"/proc/kcore",
"/proc/latency_stats",
"/proc/timer_stats",
"/proc/sched_debug"
],
"readonlyPaths": [
"/proc/asound",
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
Apr 22, 2016
Apr 22, 2016
661
662
],
"mountLabel": "system_u:object_r:svirt_sandbox_file_t:s0:c715,c811"
Apr 11, 2016
Apr 11, 2016
663
664
665
666
},
"annotations": {
"key1": "value1",
"key2": "value2"
Mar 9, 2016
Mar 9, 2016
667
}
Mar 9, 2016
Mar 9, 2016
668
669
670
}
```
Apr 30, 2016
Apr 30, 2016
671
[runtime-namespace]: glossary.md#runtime-namespace
Oct 6, 2015
Oct 6, 2015
672
[uts-namespace]: http://man7.org/linux/man-pages/man7/namespaces.7.html
May 20, 2016
May 20, 2016
673
[go-environment]: https://golang.org/doc/install/source#environment