Skip to content

Commit 99c7b69

Browse files
author
John Howard
committed
Windows: User struct changes
Signed-off-by: John Howard <[email protected]>
1 parent b3ce195 commit 99c7b69

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

config.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,31 @@ _Note: For Solaris, uid and gid specify the uid and gid of the process inside th
186186
"cwd": "/root",
187187
"args": [
188188
"/usr/bin/bash"
189+
]
190+
}
191+
```
192+
193+
#### Windows User
194+
195+
For Windows based systems the user structure has the following fields:
196+
197+
* **`username`** (string, optional) specifies the user name for the process.
198+
199+
### Example (Windows)
200+
201+
```json
202+
"process": {
203+
"terminal": true,
204+
"user": {
205+
"username": "containeradministrator"
206+
},
207+
"env": [
208+
"VARIABLE=1"
189209
],
210+
"cwd": "c:\\foo",
211+
"args": [
212+
"someapp.exe"],
213+
]
190214
}
191215
```
192216

specs-go/config.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,16 @@ type Process struct {
5353
SelinuxLabel string `json:"selinuxLabel,omitempty" platform:"linux"`
5454
}
5555

56-
// User specifies Linux/Solaris specific user and group information
57-
// for the container process.
56+
// User specifies specific user (and group) information for the container process.
5857
type User struct {
5958
// UID is the user id. (this field is platform dependent)
6059
UID uint32 `json:"uid" platform:"linux,solaris"`
6160
// GID is the group id. (this field is platform dependent)
6261
GID uint32 `json:"gid" platform:"linux,solaris"`
6362
// AdditionalGids are additional group ids set for the container's process. (this field is platform dependent)
6463
AdditionalGids []uint32 `json:"additionalGids,omitempty" platform:"linux,solaris"`
64+
// Username is the user name. (this field is platform dependent)
65+
Username string `json:"username,omitempty" platform:"windows"`
6566
}
6667

6768
// Root contains information about the container's root filesystem on the host.

0 commit comments

Comments
 (0)