Skip to content

Commit 0efe3b8

Browse files
author
John Howard
committed
Windows: Add initialConsoleSize to process
Signed-off-by: John Howard <[email protected]>
1 parent b3ce195 commit 0efe3b8

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-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+
* **`initialConsoleSize`** (box, optional) specifies the initial 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+
"initialConsoleSize": {
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+
"initialConsoleSize": {
183+
"height": 25,
184+
"width": 80
185+
},
177186
"user": {
178187
"uid": 1,
179188
"gid": 1,

specs-go/config.go

Lines changed: 7 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+
// InitialConsoleSize contains the initial size of the console.
35+
InitialConsoleSize Box `json:"initialConsoleSize"`
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.
@@ -64,6 +66,11 @@ type User struct {
6466
AdditionalGids []uint32 `json:"additionalGids,omitempty" platform:"linux,solaris"`
6567
}
6668

69+
type Box struct {
70+
Height uint `json:"height"`
71+
Width uint `json:"width"`
72+
}
73+
6774
// Root contains information about the container's root filesystem on the host.
6875
type Root struct {
6976
// Path is the absolute path to the container's root filesystem.

0 commit comments

Comments
 (0)