Struct oci_spec::runtime::Hooks [−][src]
pub struct Hooks {
pub prestart: Option<Vec<Hook>>,
pub create_runtime: Option<Vec<Hook>>,
pub create_container: Option<Vec<Hook>>,
pub start_container: Option<Vec<Hook>>,
pub poststart: Option<Vec<Hook>>,
pub poststop: Option<Vec<Hook>>,
}Expand description
Hooks specifies a command that is run in the container at a particular event in the lifecycle (setup and teardown) of a container.
Fields
prestart: Option<Vec<Hook>>Prestart hooks were deprecated in favor of createRuntime, createContainer and startContainer hooks
The prestart hooks MUST be called after the start operation is
called but before the user-specified program command is
executed.
On Linux, for example, they are called after the container namespaces are created, so they provide an opportunity to customize the container (e.g. the network namespace could be specified in this hook).
The prestart hooks’ path MUST resolve in the runtime namespace.
The prestart hooks MUST be executed in the runtime namespace.
create_runtime: Option<Vec<Hook>>CreateRuntime is a list of hooks to be run after the container has
been created but before pivot_root or any equivalent
operation has been called. It is called in the Runtime
Namespace.
create_container: Option<Vec<Hook>>CreateContainer is a list of hooks to be run after the container has
been created but before pivot_root or any equivalent
operation has been called. It is called in the
Container Namespace.
start_container: Option<Vec<Hook>>StartContainer is a list of hooks to be run after the start operation is called but before the container process is started. It is called in the Container Namespace.
poststart: Option<Vec<Hook>>Poststart is a list of hooks to be run after the container process is started. It is called in the Runtime Namespace.
poststop: Option<Vec<Hook>>Poststop is a list of hooks to be run after the container process exits. It is called in the Runtime Namespace.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Hooks
impl UnwindSafe for Hooks
Blanket Implementations
Mutably borrows from an owned value. Read more