diff --git a/runtime.md b/runtime.md index 2120f08f0..b6e5f19a7 100644 --- a/runtime.md +++ b/runtime.md @@ -56,10 +56,13 @@ The pre-start hooks are called after the container process is spawned, but befor They are called after the container namespaces are created on Linux, so they provide an opportunity to customize the container. In Linux, for e.g., the network namespace could be configured in this hook. +The hooks MUST be called in the listed order (`prestart[0]` first, `prestart[1]` second, …). 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-stop The post-stop hooks are called after the container process is stopped. Cleanup or debugging could be performed in such a hook. + +The hooks MUST be called in the listed order (`poststop[0]` first, `poststop[1]` second, …). If a hook returns a non-zero exit code, then an error is logged and the remaining hooks are executed. *Example*