Skip to content

Commit

Permalink
Merge pull request #563 from jhowardmsft/jjh/initialconsolesize
Browse files Browse the repository at this point in the history
config: Add consoleSize to process
  • Loading branch information
Mrunal Patel committed Sep 21, 2016
2 parents d850760 + a502caf commit c356a80
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
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

0 comments on commit c356a80

Please sign in to comment.