Merge pull request #701 from wking/optional-process

config: Make process optional
This commit is contained in:
Michael Crosby
2017-05-10 15:03:06 -07:00
committed by GitHub
4 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -119,7 +119,8 @@ For Windows, see [mountvol][mountvol] and [SetVolumeMountPoint][set-volume-mount
## <a name="configProcess" />Process
**`process`** (object, REQUIRED) specifies the container process.
**`process`** (object, OPTIONAL) specifies the container process.
This property is REQUIRED when [`start`](runtime.md#start) is called.
* **`terminal`** (bool, OPTIONAL) specifies whether a terminal is attached to that process, defaults to false.
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].
+1
View File
@@ -116,6 +116,7 @@ This operation MUST [generate an error](#errors) if it is not provided the conta
Attempting to start a container that does not exist MUST [generate an error](#errors).
Attempting to start an already started container MUST have no effect on the container and MUST [generate an error](#errors).
This operation MUST run the user-specified program as specified by [`process`](config.md#process).
This operation MUST generate an error if `process` was not set.
### <a name="runtimeKill" />Kill
`kill <container-id> <signal>`
-1
View File
@@ -237,7 +237,6 @@
"required": [
"ociVersion",
"platform",
"process",
"root"
]
}
+1 -1
View File
@@ -9,7 +9,7 @@ type Spec struct {
// Platform specifies the configuration's target platform.
Platform Platform `json:"platform"`
// Process configures the container process.
Process Process `json:"process"`
Process *Process `json:"process,omitempty"`
// Root configures the container's root filesystem.
Root Root `json:"root"`
// Hostname configures the container's hostname.