Skip to content

Commit f31b19f

Browse files
author
John Howard
committed
config: Add consoleSize to process
Signed-off-by: John Howard <[email protected]>
1 parent 313f40b commit f31b19f

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

config.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ See links for details about [mountvol](http://ss64.com/nt/mountvol.html) and [Se
9595
**`process`** (object, REQUIRED) configures the container process.
9696

9797
* **`terminal`** (bool, OPTIONAL) specifies whether you want a terminal attached to that process, defaults to false.
98+
* **`consoleSize`** (box, OPTIONAL) specifies the console size of the terminal if attached.
9899
* **`cwd`** (string, REQUIRED) is the working directory that will be set for the executable.
99100
This value MUST be an absolute path.
100101
* **`env`** (array of strings, OPTIONAL) contains a list of variables that will be set in the process's environment prior to execution.
@@ -139,6 +140,10 @@ _Note: For Solaris, uid and gid specify the uid and gid of the process inside th
139140
```json
140141
"process": {
141142
"terminal": true,
143+
"consoleSize": {
144+
"height": 25,
145+
"width": 80
146+
},
142147
"user": {
143148
"uid": 1,
144149
"gid": 1,
@@ -174,6 +179,10 @@ _Note: For Solaris, uid and gid specify the uid and gid of the process inside th
174179
```json
175180
"process": {
176181
"terminal": true,
182+
"consoleSize": {
183+
"height": 25,
184+
"width": 80
185+
},
177186
"user": {
178187
"uid": 1,
179188
"gid": 1,

specs-go/config.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ type Spec struct {
3131
type Process struct {
3232
// Terminal creates an interactive terminal for the container.
3333
Terminal bool `json:"terminal,omitempty"`
34+
// ConsoleSize specifies the size of the console.
35+
ConsoleSize Box `json:"consoleSize,omitempty"`
3436
// User specifies user information for the process.
3537
User User `json:"user"`
3638
// Args specifies the binary and arguments for the application to execute.
@@ -52,6 +54,14 @@ type Process struct {
5254
SelinuxLabel string `json:"selinuxLabel,omitempty" platform:"linux"`
5355
}
5456

57+
// Box specifies dimensions of a rectangle. Used for specifying the size of a console.
58+
type Box struct {
59+
// Height is the vertical dimension of a box.
60+
Height uint `json:"height"`
61+
// Width is the horizontal dimension of a box.
62+
Width uint `json:"width"`
63+
}
64+
5565
// User specifies specific user (and group) information for the container process.
5666
type User struct {
5767
// UID is the user id.

0 commit comments

Comments
 (0)