diff --git a/config.md b/config.md index 0f43347a6..d6e8000e3 100644 --- a/config.md +++ b/config.md @@ -251,6 +251,7 @@ _Note: For Solaris, uid and gid specify the uid and gid of the process inside th ## Hooks +**`hooks`** (object, optional) configures callbacks for container lifecycle events. Lifecycle hooks allow custom events for different points in a container's runtime. Presently there are `Prestart`, `Poststart` and `Poststop`. diff --git a/specs-go/config.go b/specs-go/config.go index 5bbd66d46..f4c6b28fc 100644 --- a/specs-go/config.go +++ b/specs-go/config.go @@ -16,7 +16,7 @@ type Spec struct { Hostname string `json:"hostname,omitempty"` // Mounts configures additional mounts (on top of Root). Mounts []Mount `json:"mounts,omitempty"` - // Hooks are the commands run at various lifecycle events of the container. + // Hooks configures callbacks for container lifecycle events. Hooks Hooks `json:"hooks"` // Annotations is an unstructured key value map that may be set by external tools to store and retrieve arbitrary metadata. Annotations map[string]string `json:"annotations,omitempty"`