Skip to content

Commit f025239

Browse files
committed
config: Explicitly list process.user as required
Linux and Solaris both use the same POSIX-based structure (which I've moved to defs-linux.json). Windows likely needs a string-based structure, but we're punting on that until we have more feedback from the Windows folks [1]. Regardless of whether we have a Windows user structure yet, the maintainer consensus is that the property is required [2,3,4]. [1]: opencontainers#96 (comment) [2]: http://ircbot.wl.linuxfoundation.org/meetings/opencontainers/2016/opencontainers.2016-05-04-17.00.log.html#l-44 [3]: opencontainers#417 (comment) [4]: opencontainers#417 (comment) Signed-off-by: W. Trevor King <[email protected]>
1 parent 5ca74df commit f025239

File tree

3 files changed

+26
-15
lines changed

3 files changed

+26
-15
lines changed

config.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ See links for details about [mountvol](http://ss64.com/nt/mountvol.html) and [Se
9999
* **`args`** (array of strings, optional) executable to launch and any flags as an array.
100100
The executable is the first element and MUST be available at the given path inside of the rootfs.
101101
If the executable path is not an absolute path then the search $PATH is interpreted to find the executable.
102+
* **`user`** (object, required) the process user.
103+
The properties for this object are [platform dependent](#user).
102104

103105
For Linux-based systems the process structure supports the following process specific fields:
104106

schema/defs-linux.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
{
22
"definitions": {
3+
"user": {
4+
"type": "object",
5+
"properties": {
6+
"uid": {
7+
"$ref": "defs.json#/definitions/UID"
8+
},
9+
"gid": {
10+
"$ref": "defs.json#/definitions/GID"
11+
},
12+
"additionalGids": {
13+
"$ref": "defs.json#/definitions/ArrayOfGIDs"
14+
}
15+
},
16+
"required": [
17+
"uid",
18+
"gid"
19+
]
20+
},
321
"SeccompArch": {
422
"type": "string",
523
"enum": [

schema/schema.json

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@
8383
"id": "https://opencontainers.org/schema/bundle/process",
8484
"type": "object",
8585
"required": [
86-
"cwd"
86+
"cwd",
87+
"user"
8788
],
8889
"properties": {
8990
"args": {
@@ -104,21 +105,11 @@
104105
},
105106
"user": {
106107
"id": "https://opencontainers.org/schema/bundle/process/user",
107-
"type": "object",
108-
"properties": {
109-
"uid": {
110-
"id": "https://opencontainers.org/schema/bundle/process/user/uid",
111-
"$ref": "defs.json#/definitions/UID"
112-
},
113-
"gid": {
114-
"id": "https://opencontainers.org/schema/bundle/process/user/gid",
115-
"$ref": "defs.json#/definitions/GID"
116-
},
117-
"additionalGids": {
118-
"id": "https://opencontainers.org/schema/bundle/process/user/additionalGids",
119-
"$ref": "defs.json#/definitions/ArrayOfGIDs"
108+
"oneOf": [
109+
{
110+
"$ref": "defs-linux.json#/definitions/user"
120111
}
121-
}
112+
]
122113
},
123114
"capabilities": {
124115
"id": "https://opencontainers.org/schema/bundle/process/linux/capabilities",

0 commit comments

Comments
 (0)