Skip to content

Latest commit

 

History

History
698 lines (624 loc) · 22.3 KB

File metadata and controls

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