From 4b0755490ea964de08d36372b0fe7eb5100a82bf Mon Sep 17 00:00:00 2001 From: Mrunal Patel Date: Thu, 2 Mar 2017 11:00:53 -0800 Subject: [PATCH] Add anchors to runtime Signed-off-by: Mrunal Patel --- runtime.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/runtime.md b/runtime.md index e43ad8971..84dce36e9 100644 --- a/runtime.md +++ b/runtime.md @@ -1,11 +1,11 @@ -# Runtime and Lifecycle +# Runtime and Lifecycle -## Scope of a Container +## Scope of a Container Barring access control concerns, the entity using a runtime to create a container MUST be able to use the operations defined in this specification against that same container. Whether other entities using the same, or other, instance of the runtime can see that container is out of scope of this specification. -## State +## State The state of a container includes the following properties: @@ -47,7 +47,7 @@ When serialized in JSON, the format MUST adhere to the following pattern: See [Query State](#query-state) for information on retrieving the state of a container. -## Lifecycle +## Lifecycle The lifecycle describes the timeline of events that happen from when a container is created to when it ceases to exist. 1. OCI compliant runtime's [`create`](runtime.md#create) command is invoked with a reference to the location of the bundle and a unique identifier. @@ -64,18 +64,18 @@ The lifecycle describes the timeline of events that happen from when a container 6. Runtime's [`delete`](runtime.md#delete) command is invoked with the unique identifier of the container. The container MUST be destroyed by undoing the steps performed during create phase (step 2). -## Errors +## Errors In cases where the specified operation generates an error, this specification does not mandate how, or even if, that error is returned or exposed to the user of an implementation. Unless otherwise stated, generating an error MUST leave the state of the environment as if the operation were never attempted - modulo any possible trivial ancillary changes such as logging. -## Operations +## Operations OCI compliant runtimes MUST support the following operations, unless the operation is not supported by the base operating system. Note: these operations are not specifying any command-line APIs, and the parameters are inputs for general operations. -### Query State +### Query State `state ` @@ -83,7 +83,7 @@ This operation MUST generate an error if it is not provided the ID of a containe Attempting to query a container that does not exist MUST generate an error. This operation MUST return the state of a container as specified in the [State](#state) section. -### Create +### Create `create ` @@ -100,7 +100,7 @@ Runtime callers who are interested in pre-create validation can run [bundle-vali Any changes made to the [`config.json`](config.md) file after this operation will not have an effect on the container. -### Start +### Start `start ` This operation MUST generate an error if it is not provided the container ID. @@ -110,7 +110,7 @@ This operation MUST run the user-specified program as specified by [`process`](c Upon successful completion of this operation the `status` property of this container MUST be `running`. -### Kill +### Kill `kill ` This operation MUST generate an error if it is not provided the container ID. @@ -119,7 +119,7 @@ This operation MUST send the specified signal to the process in the container. When the process in the container is stopped, irrespective of it being as a result of a `kill` operation or any other reason, the `status` property of this container MUST be `stopped`. -### Delete +### Delete `delete ` This operation MUST generate an error if it is not provided the container ID. @@ -130,6 +130,6 @@ Note that resources associated with the container, but not created by this conta Once a container is deleted its ID MAY be used by a subsequent container. -## Hooks +## Hooks Many of the operations specified in this specification have "hooks" that allow for additional actions to be taken before or after each operation. See [runtime configuration for hooks](./config.md#hooks) for more information.