Skip to content

Commit eb670c8

Browse files
committed
runtime-linux: Transition from Markdown to AsciiDoc
The new bits for this file are the table [1] and the leveloffset [2]. Keeping runtime-linux under runtime makes the ToC tree more consistent (all the runtime stuff is under section 5). [1]: http://asciidoc.org/userguide.html#_tables 23. Tables [2]: http://asciidoc.org/userguide.html#X90 36.5. Combining separate documents
1 parent 19e653f commit eb670c8

File tree

4 files changed

+48
-30
lines changed

4 files changed

+48
-30
lines changed

protocols.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ Protocols
33

44
Protocols defined by this specification are:
55

6-
* Linux containers: <<runtime>>, `<<runtime-linux>>`, `<<config>>`, and `<<config-linux>>`.
6+
* Linux containers: <<runtime>>, <<runtime-linux>>, `<<config>>`, and `<<config-linux>>`.
77
* Solaris containers: <<runtime>>, `<<config>>`, and `<<config-solaris>>`.
88
* Windows containers: <<runtime>>, `<<config>>`, and `<<config-windows>>`.

runtime-linux.asc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[[runtime-linux]]
2+
Linux Runtime
3+
-------------
4+
5+
:socket-activation: http://0pointer.de/blog/projects/socket-activated-containers.html
6+
7+
File descriptors
8+
~~~~~~~~~~~~~~~~
9+
10+
By default, only the `stdin`, `stdout` and `stderr` file descriptors are kept open for the application by the runtime.
11+
The runtime MAY pass additional file descriptors to the application to support features such as {socket-activation}[socket activation].
12+
Some of the file descriptors MAY be redirected to `/dev/null` even though they are open.
13+
14+
Dev symbolic links
15+
~~~~~~~~~~~~~~~~~~
16+
17+
After the container has `/proc` mounted, the following standard symlinks MUST be setup within `/dev/` for the IO.
18+
19+
.Required symbolic links
20+
[cols="m,m",frame="topbot",options="header"]
21+
|==============================
22+
| Source | Destination
23+
| /proc/self/fd | /dev/fd
24+
| /proc/self/fd/0 | /dev/stdin
25+
| /proc/self/fd/1 | /dev/stdout
26+
| /proc/self/fd/2 | /dev/stderr
27+
|==============================

runtime-linux.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

runtime.asc

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,20 @@
22
Runtime and Lifecycle
33
---------------------
44

5+
Platform-independent runtime behavior
6+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7+
58
:implementation-testing: https://github.com/opencontainers/runtime-spec/blob/master/implementations.md#testing--tools
69

710
Scope of a Container
8-
~~~~~~~~~~~~~~~~~~~~
11+
^^^^^^^^^^^^^^^^^^^^
912

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

1316
[[state]]
1417
State
15-
^^^^^
18+
+++++
1619

1720
The state of a container MUST include, at least, the following properties:
1821

@@ -70,7 +73,7 @@ When serialized in JSON, the format MUST adhere to the following pattern:
7073
See <<state-operation>> for information on retrieving the state of a container.
7174

7275
Lifecycle
73-
~~~~~~~~~
76+
^^^^^^^^^
7477

7578
The lifecycle describes the timeline of events that happen from when a container is created to when it ceases to exist.
7679

@@ -101,13 +104,13 @@ The lifecycle describes the timeline of events that happen from when a container
101104
The container MUST be destroyed by undoing the steps performed during create phase (<<lifecycle-create>>).
102105

103106
Errors
104-
~~~~~~
107+
^^^^^^
105108

106109
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.
107110
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.
108111

109112
Operations
110-
~~~~~~~~~~
113+
^^^^^^^^^^
111114

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

@@ -117,7 +120,7 @@ These operations are not specifying any command line APIs, and the parameters ar
117120
[[state-operation]]
118121
[caption="foo bar"]
119122
State
120-
^^^^^
123+
+++++
121124

122125
`state <container-id>`
123126

@@ -127,7 +130,7 @@ This operation MUST return the state of a container as specified in <<state>>.
127130

128131
[[create,create]]
129132
Create
130-
^^^^^^
133+
++++++
131134

132135
`create <container-id> <path-to-bundle>`
133136

@@ -146,7 +149,7 @@ Any changes made to the `<<config>>` after this operation will not have an effec
146149

147150
[[start,start]]
148151
Start
149-
^^^^^
152+
+++++
150153

151154
`start <container-id>`
152155

@@ -159,7 +162,7 @@ Upon successful completion of this operation the <<status>> property of this con
159162

160163
[[kill,kill]]
161164
Kill
162-
^^^^
165+
++++
163166

164167
`kill <container-id> <signal>`
165168

@@ -171,7 +174,7 @@ When the process in the container is stopped, irrespective of it being as a resu
171174

172175
[[delete,delete]]
173176
Delete
174-
^^^^^^
177+
++++++
175178

176179
`delete <container-id>`
177180

@@ -184,7 +187,13 @@ Once a container is deleted its ID MAY be used by a subsequent container.
184187

185188
[[runtime-hooks]]
186189
Hooks
187-
^^^^^
190+
+++++
188191

189192
Many of the operations specified in this specification have "hooks" that allow for additional actions to be taken before or after each operation.
190193
See `<<hooks>>` for more information.
194+
195+
:leveloffset: 1
196+
197+
include::runtime-linux.asc[]
198+
199+
:leveloffset: 0

0 commit comments

Comments
 (0)