Skip to content

Commit 57a5876

Browse files
Merge pull request #701 from wking/optional-process
config: Make process optional
2 parents 7a75267 + c41ea83 commit 57a5876

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

config.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ For Windows, see [mountvol][mountvol] and [SetVolumeMountPoint][set-volume-mount
119119

120120
## <a name="configProcess" />Process
121121

122-
**`process`** (object, REQUIRED) specifies the container process.
122+
**`process`** (object, OPTIONAL) specifies the container process.
123+
This property is REQUIRED when [`start`](runtime.md#start) is called.
123124

124125
* **`terminal`** (bool, OPTIONAL) specifies whether a terminal is attached to that process, defaults to false.
125126
As an example, if set to true on Linux a pseudoterminal pair is allocated for the container process and the pseudoterminal slave is duplicated on the container process's [standard streams][stdin.3].

runtime.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ This operation MUST [generate an error](#errors) if it is not provided the conta
116116
Attempting to start a container that does not exist MUST [generate an error](#errors).
117117
Attempting to start an already started container MUST have no effect on the container and MUST [generate an error](#errors).
118118
This operation MUST run the user-specified program as specified by [`process`](config.md#process).
119+
This operation MUST generate an error if `process` was not set.
119120

120121
### <a name="runtimeKill" />Kill
121122
`kill <container-id> <signal>`

schema/config-schema.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@
237237
"required": [
238238
"ociVersion",
239239
"platform",
240-
"process",
241240
"root"
242241
]
243242
}

specs-go/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type Spec struct {
99
// Platform specifies the configuration's target platform.
1010
Platform Platform `json:"platform"`
1111
// Process configures the container process.
12-
Process Process `json:"process"`
12+
Process *Process `json:"process,omitempty"`
1313
// Root configures the container's root filesystem.
1414
Root Root `json:"root"`
1515
// Hostname configures the container's hostname.

0 commit comments

Comments
 (0)