Skip to content

Commit 55956b8

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

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.
@@ -53,6 +55,14 @@ type Process struct {
5355
SelinuxLabel string `json:"selinuxLabel,omitempty" platform:"linux"`
5456
}
5557

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

0 commit comments

Comments
 (0)