You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: runtime.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
-
# Runtime and Lifecycle
1
+
# <aname="runtimeAndLifecycle" />Runtime and Lifecycle
2
2
3
-
## Scope of a Container
3
+
## <aname="runtimeScopeContainer" />Scope of a Container
4
4
5
5
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.
6
6
Whether other entities using the same, or other, instance of the runtime can see that container is out of scope of this specification.
7
7
8
-
## State
8
+
## <aname="runtimeState" />State
9
9
10
10
The state of a container includes the following properties:
11
11
@@ -47,7 +47,7 @@ When serialized in JSON, the format MUST adhere to the following pattern:
47
47
48
48
See [Query State](#query-state) for information on retrieving the state of a container.
49
49
50
-
## Lifecycle
50
+
## <aname="runtimeLifecycle" />Lifecycle
51
51
The lifecycle describes the timeline of events that happen from when a container is created to when it ceases to exist.
52
52
53
53
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,26 +64,26 @@ The lifecycle describes the timeline of events that happen from when a container
64
64
6. Runtime's [`delete`](runtime.md#delete) command is invoked with the unique identifier of the container.
65
65
The container MUST be destroyed by undoing the steps performed during create phase (step 2).
66
66
67
-
## Errors
67
+
## <aname="runtimeErrors" />Errors
68
68
69
69
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.
70
70
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.
71
71
72
-
## Operations
72
+
## <aname="runtimeOperations" />Operations
73
73
74
74
OCI compliant runtimes MUST support the following operations, unless the operation is not supported by the base operating system.
75
75
76
76
Note: these operations are not specifying any command-line APIs, and the parameters are inputs for general operations.
77
77
78
-
### Query State
78
+
### <aname="runtimeQueryState" />Query State
79
79
80
80
`state <container-id>`
81
81
82
82
This operation MUST generate an error if it is not provided the ID of a container.
83
83
Attempting to query a container that does not exist MUST generate an error.
84
84
This operation MUST return the state of a container as specified in the [State](#state) section.
85
85
86
-
### Create
86
+
### <aname="runtimeCreate" />Create
87
87
88
88
`create <container-id> <path-to-bundle>`
89
89
@@ -100,7 +100,7 @@ Runtime callers who are interested in pre-create validation can run [bundle-vali
100
100
101
101
Any changes made to the [`config.json`](config.md) file after this operation will not have an effect on the container.
102
102
103
-
### Start
103
+
### <aname="runtimeStart" />Start
104
104
`start <container-id>`
105
105
106
106
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
110
110
111
111
Upon successful completion of this operation the `status` property of this container MUST be `running`.
112
112
113
-
### Kill
113
+
### <aname="runtimeKill" />Kill
114
114
`kill <container-id> <signal>`
115
115
116
116
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.
119
119
120
120
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`.
121
121
122
-
### Delete
122
+
### <aname="runtimeDelete" />Delete
123
123
`delete <container-id>`
124
124
125
125
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
130
130
Once a container is deleted its ID MAY be used by a subsequent container.
131
131
132
132
133
-
## Hooks
133
+
## <aname="runtimeHooks" />Hooks
134
134
Many of the operations specified in this specification have "hooks" that allow for additional actions to be taken before or after each operation.
135
135
See [runtime configuration for hooks](./config.md#hooks) for more information.
0 commit comments