Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: User struct changes #565

Merged
merged 1 commit into from
Sep 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions config.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,31 @@ _Note: For Solaris, uid and gid specify the uid and gid of the process inside th
"cwd": "/root",
"args": [
"/usr/bin/bash"
]
}
```

#### Windows User

For Windows based systems the user structure has the following fields:

* **`username`** (string, optional) specifies the user name for the process.

### Example (Windows)

```json
"process": {
"terminal": true,
"user": {
"username": "containeradministrator"
},
"env": [
"VARIABLE=1"
],
"cwd": "c:\\foo",
"args": [
"someapp.exe",
]
}
```

Expand Down
5 changes: 3 additions & 2 deletions specs-go/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,16 @@ type Process struct {
SelinuxLabel string `json:"selinuxLabel,omitempty" platform:"linux"`
}

// User specifies Linux/Solaris specific user and group information
// for the container process.
// User specifies specific user (and group) information for the container process.
type User struct {
// UID is the user id. (this field is platform dependent)
UID uint32 `json:"uid" platform:"linux,solaris"`
// GID is the group id. (this field is platform dependent)
GID uint32 `json:"gid" platform:"linux,solaris"`
// AdditionalGids are additional group ids set for the container's process. (this field is platform dependent)
AdditionalGids []uint32 `json:"additionalGids,omitempty" platform:"linux,solaris"`
// Username is the user name. (this field is platform dependent)
Username string `json:"username,omitempty" platform:"windows"`
}

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