Merge pull request #227 from opencontainers/vbatts-no-hyphens
lifecycle: no hyphens
This commit is contained in:
commit
e71b6dd441
|
@ -5,9 +5,9 @@
|
|||
Lifecycle hooks allow custom events for different points in a container's runtime.
|
||||
Presently there are `Prestart`, `Poststart` and `Poststop`.
|
||||
|
||||
* [`Prestart`](#pre-start) is a list of hooks to be run before the container process is executed
|
||||
* [`Poststart`](#post-start) is a list of hooks to be run immediately after the container process is started
|
||||
* [`Poststop`](#post-stop) is a list of hooks to be run after the container process exits
|
||||
* [`Prestart`](#prestart) is a list of hooks to be run before the container process is executed
|
||||
* [`Poststart`](#poststart) is a list of hooks to be run immediately after the container process is started
|
||||
* [`Poststop`](#poststop) is a list of hooks to be run after the container process exits
|
||||
|
||||
Hooks allow one to run code before/after various lifecycle events of the container.
|
||||
Hooks MUST be called in the listed order.
|
||||
|
@ -15,7 +15,7 @@ The state of the container is passed to the hooks over stdin, so the hooks could
|
|||
|
||||
Hook paths are absolute and are executed from the host's filesystem.
|
||||
|
||||
### Pre-start
|
||||
### Prestart
|
||||
|
||||
The pre-start hooks are called after the container process is spawned, but before the user supplied command is executed.
|
||||
They are called after the container namespaces are created on Linux, so they provide an opportunity to customize the container.
|
||||
|
@ -23,14 +23,14 @@ In Linux, for e.g., the network namespace could be configured in this hook.
|
|||
|
||||
If a hook returns a non-zero exit code, then an error including the exit code and the stderr is returned to the caller and the container is torn down.
|
||||
|
||||
### Post-start
|
||||
### Poststart
|
||||
|
||||
The post-start hooks are called after the user process is started.
|
||||
For example this hook can notify user that real process is spawned.
|
||||
|
||||
If a hook returns a non-zero exit code, then an error is logged and the remaining hooks are executed.
|
||||
|
||||
### Post-stop
|
||||
### Poststop
|
||||
|
||||
The post-stop hooks are called after the container process is stopped.
|
||||
Cleanup or debugging could be performed in such a hook.
|
||||
|
|
Loading…
Reference in New Issue