diff --git a/config.md b/config.md index 22436cb0d..71511a658 100644 --- a/config.md +++ b/config.md @@ -119,7 +119,8 @@ For Windows, see [mountvol][mountvol] and [SetVolumeMountPoint][set-volume-mount ## 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]. diff --git a/runtime.md b/runtime.md index 6b725e485..a1c73d287 100644 --- a/runtime.md +++ b/runtime.md @@ -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. ### Kill `kill ` diff --git a/schema/config-schema.json b/schema/config-schema.json index aa131257e..ca3715939 100644 --- a/schema/config-schema.json +++ b/schema/config-schema.json @@ -237,7 +237,6 @@ "required": [ "ociVersion", "platform", - "process", "root" ] } diff --git a/specs-go/config.go b/specs-go/config.go index 4139f9f70..f2016b04b 100644 --- a/specs-go/config.go +++ b/specs-go/config.go @@ -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.