Skip to content

Commit e6fd589

Browse files
authored
[Runtime] Add anchor tags for headings and bullets
Signed-off-by: Rob Dolin <robdolin@microsoft.com>
1 parent f815650 commit e6fd589

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

runtime.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
# Runtime and Lifecycle
1+
# <a name="runtimeAndLifecycle" />Runtime and Lifecycle
22

3-
## Scope of a Container
3+
## <a name="scopeOfAContainer" />Scope of a Container
44

55
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.
66
Whether other entities using the same, or other, instance of the runtime can see that container is out of scope of this specification.
77

8-
## State
8+
## <a name="state" />State
99

1010
The state of a container MUST include, at least, the following properties:
1111

12-
* **`ociVersion`**: (string) is the OCI specification version used when creating the container.
13-
* **`id`**: (string) is the container's ID.
12+
* <a name="stateOciVersion" />**`ociVersion`**: (string) is the OCI specification version used when creating the container.
13+
* <a name="stateId" />**`id`**: (string) is the container's ID.
1414
This MUST be unique across all containers on this host.
1515
There is no requirement that it be unique across hosts.
16-
* **`status`**: (string) is the runtime state of the container.
16+
* <a name="stateStatus" />**`status`**: (string) is the runtime state of the container.
1717
The value MAY be one of:
1818
* `created`: the container has been created but the user-specified code has not yet been executed
1919
* `running`: the container has been created and the user-specified code is running
2020
* `stopped`: the container has been created and the user-specified code has been executed but is no longer running
2121

2222
Additional values MAY be defined by the runtime, however, they MUST be used to represent new runtime states not defined above.
23-
* **`pid`**: (int) is the ID of the container process, as seen by the host.
24-
* **`bundlePath`**: (string) is the absolute path to the container's bundle directory.
23+
* <a name="statePid" />**`pid`**: (int) is the ID of the container process, as seen by the host.
24+
* <a name="stateBundlePath" />**`bundlePath`**: (string) is the absolute path to the container's bundle directory.
2525
This is provided so that consumers can find the container's configuration and root filesystem on the host.
26-
* **`annotations`**: (map) contains the list of annotations associated with the container.
26+
* <a name="stateAnnotations" />**`annotations`**: (map) contains the list of annotations associated with the container.
2727
If no annotations were provided then this property MAY either be absent or an empty map.
2828

2929
When serialized in JSON, the format MUST adhere to the following pattern:
@@ -43,43 +43,43 @@ When serialized in JSON, the format MUST adhere to the following pattern:
4343

4444
See [Query State](#query-state) for information on retrieving the state of a container.
4545

46-
## Lifecycle
46+
## <a name="lifecycle" />Lifecycle
4747
The lifecycle describes the timeline of events that happen from when a container is created to when it ceases to exist.
4848

49-
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.
50-
2. The container's runtime environment MUST be created according to the configuration in [`config.json`](config.md).
49+
1. <a name="lifecycle01" />OCI compliant runtime's [`create`](runtime.md#create) command is invoked with a reference to the location of the bundle and a unique identifier.
50+
2. <a name="lifecycle02" />The container's runtime environment MUST be created according to the configuration in [`config.json`](config.md).
5151
If the runtime is unable to create the environment specified in the [`config.json`](config.md), it MUST generate an error.
5252
While the resources requested in the [`config.json`](config.md) MUST be created, the user-specified code (from [`process`](config.md#process-configuration)) MUST NOT be run at this time.
5353
Any updates to [`config.json`](config.md) after this step MUST NOT affect the container.
54-
3. Once the container is created additional actions MAY be performed based on the features the runtime chooses to support.
54+
3. <a name="lifecycle03" />Once the container is created additional actions MAY be performed based on the features the runtime chooses to support.
5555
However, some actions might only be available based on the current state of the container (e.g. only available while it is started).
56-
4. Runtime's [`start`](runtime.md#start) command is invoked with the unique identifier of the container.
56+
4. <a name="lifecycle04" />Runtime's [`start`](runtime.md#start) command is invoked with the unique identifier of the container.
5757
The runtime MUST run the user-specified code, as specified by [`process`](config.md#process-configuration).
58-
5. The container's process is stopped.
58+
5. <a name="lifecycle05" />The container's process is stopped.
5959
This MAY happen due to them erroring out, exiting, crashing or the runtime's [`kill`](runtime.md#kill) operation being invoked.
60-
6. Runtime's [`delete`](runtime.md#delete) command is invoked with the unique identifier of the container.
60+
6. <a name="lifecycle06" />Runtime's [`delete`](runtime.md#delete) command is invoked with the unique identifier of the container.
6161
The container MUST be destroyed by undoing the steps performed during create phase (step 2).
6262

63-
## Errors
63+
## <a name="errors" />Errors
6464

6565
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.
6666
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.
6767

68-
## Operations
68+
## <a name="operations" />Operations
6969

7070
OCI compliant runtimes MUST support the following operations, unless the operation is not supported by the base operating system.
7171

7272
Note: these operations are not specifying any command-line APIs, and the parameters are inputs for general operations.
7373

74-
### Query State
74+
### <a name="queryState" />Query State
7575

7676
`state <container-id>`
7777

7878
This operation MUST generate an error if it is not provided the ID of a container.
7979
Attempting to query a container that does not exist MUST generate an error.
8080
This operation MUST return the state of a container as specified in the [State](#state) section.
8181

82-
### Create
82+
### <a name="create" />Create
8383

8484
`create <container-id> <path-to-bundle>`
8585

@@ -96,7 +96,7 @@ Runtime callers who are interested in pre-create validation can run [bundle-vali
9696

9797
Any changes made to the [`config.json`](config.md) file after this operation will not have an effect on the container.
9898

99-
### Start
99+
### <a name="start" />Start
100100
`start <container-id>`
101101

102102
This operation MUST generate an error if it is not provided the container ID.
@@ -106,7 +106,7 @@ This operation MUST run the user-specified code as specified by [`process`](conf
106106

107107
Upon successful completion of this operation the `status` property of this container MUST be `running`.
108108

109-
### Kill
109+
### <a name="kill" />Kill
110110
`kill <container-id> <signal>`
111111

112112
This operation MUST generate an error if it is not provided the container ID.
@@ -115,7 +115,7 @@ This operation MUST send the specified signal to the process in the container.
115115

116116
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`.
117117

118-
### Delete
118+
### <a name="delete" />Delete
119119
`delete <container-id>`
120120

121121
This operation MUST generate an error if it is not provided the container ID.
@@ -126,6 +126,6 @@ Note that resources associated with the container, but not created by this conta
126126
Once a container is deleted its ID MAY be used by a subsequent container.
127127

128128

129-
## Hooks
129+
## <a name="hooks" />Hooks
130130
Many of the operations specified in this specification have "hooks" that allow for additional actions to be taken before or after each operation.
131131
See [runtime configuration for hooks](./config.md#hooks) for more information.

0 commit comments

Comments
 (0)