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

config: Add consoleSize to process #563

Merged
merged 1 commit into from
Sep 21, 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
11 changes: 11 additions & 0 deletions config.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ See links for details about [mountvol](http://ss64.com/nt/mountvol.html) and [Se
**`process`** (object, REQUIRED) configures the container process.

* **`terminal`** (bool, OPTIONAL) specifies whether you want a terminal attached to that process, defaults to false.
* **`consoleSize`** (object, OPTIONAL) specifies the console size of the terminal if attached, containing the following properties:
* **`height`** (uint, REQUIRED)
* **`width`** (uint, REQUIRED)
* **`cwd`** (string, REQUIRED) is the working directory that will be set for the executable.
This value MUST be an absolute path.
* **`env`** (array of strings, OPTIONAL) contains a list of variables that will be set in the process's environment prior to execution.
Expand Down Expand Up @@ -139,6 +142,10 @@ _Note: For Solaris, uid and gid specify the uid and gid of the process inside th
```json
"process": {
"terminal": true,
"consoleSize": {
"height": 25,
"width": 80
},
"user": {
"uid": 1,
"gid": 1,
Expand Down Expand Up @@ -174,6 +181,10 @@ _Note: For Solaris, uid and gid specify the uid and gid of the process inside th
```json
"process": {
"terminal": true,
"consoleSize": {
"height": 25,
"width": 80
},
"user": {
"uid": 1,
"gid": 1,
Expand Down
10 changes: 10 additions & 0 deletions specs-go/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ type Spec struct {
type Process struct {
// Terminal creates an interactive terminal for the container.
Terminal bool `json:"terminal,omitempty"`
// ConsoleSize specifies the size of the console.
ConsoleSize Box `json:"consoleSize,omitempty"`
// User specifies user information for the process.
User User `json:"user"`
// Args specifies the binary and arguments for the application to execute.
Expand All @@ -52,6 +54,14 @@ type Process struct {
SelinuxLabel string `json:"selinuxLabel,omitempty" platform:"linux"`
}

// Box specifies dimensions of a rectangle. Used for specifying the size of a console.
type Box struct {
// Height is the vertical dimension of a box.
Height uint `json:"height"`
// Width is the horizontal dimension of a box.
Width uint `json:"width"`
}

// User specifies specific user (and group) information for the container process.
type User struct {
// UID is the user id.
Expand Down