mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
Merge pull request #701 from wking/optional-process
config: Make process optional
This commit is contained in:
@@ -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].
|
||||
|
||||
@@ -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>`
|
||||
|
||||
@@ -237,7 +237,6 @@
|
||||
"required": [
|
||||
"ociVersion",
|
||||
"platform",
|
||||
"process",
|
||||
"root"
|
||||
]
|
||||
}
|
||||
|
||||
+1
-1
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user