Skip to content

Commit a502caf

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

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

config.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ 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`** (object, OPTIONAL) specifies the console size of the terminal if attached, containing the following properties:
99+
* **`height`** (uint, REQUIRED)
100+
* **`width`** (uint, REQUIRED)
98101
* **`cwd`** (string, REQUIRED) is the working directory that will be set for the executable.
99102
This value MUST be an absolute path.
100103
* **`env`** (array of strings, OPTIONAL) contains a list of variables that will be set in the process's environment prior to execution.
@@ -139,6 +142,10 @@ _Note: For Solaris, uid and gid specify the uid and gid of the process inside th
139142
```json
140143
"process": {
141144
"terminal": true,
145+
"consoleSize": {
146+
"height": 25,
147+
"width": 80
148+
},
142149
"user": {
143150
"uid": 1,
144151
"gid": 1,
@@ -174,6 +181,10 @@ _Note: For Solaris, uid and gid specify the uid and gid of the process inside th
174181
```json
175182
"process": {
176183
"terminal": true,
184+
"consoleSize": {
185+
"height": 25,
186+
"width": 80
187+
},
177188
"user": {
178189
"uid": 1,
179190
"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)