File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -364,7 +364,8 @@ Runtime implementations MAY support any valid values for platform-specific field
364364
365365## <a name =" configHooks " />Hooks
366366
367- Hooks allow for the configuration of custom actions related to the [ lifecycle] ( runtime.md#lifecycle ) of the container.
367+ Hooks allow for the configuration of custom actions related to the [ lifecycle] ( runtime.md#lifecycle ) of the container if supported by the platform.
368+ On Linux, they are run after the container namespaces are created.
368369
369370* ** ` hooks ` ** (object, OPTIONAL) MAY contain any of the following properties:
370371 * ** ` prestart ` ** (array of objects, OPTIONAL) is an array of [ pre-start hooks] ( #prestart ) .
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ type Spec struct {
1717 // Mounts configures additional mounts (on top of Root).
1818 Mounts []Mount `json:"mounts,omitempty"`
1919 // Hooks configures callbacks for container lifecycle events.
20- Hooks * Hooks `json:"hooks,omitempty"`
20+ Hooks * Hooks `json:"hooks,omitempty" platform:"linux,solaris" `
2121 // Annotations contains arbitrary metadata for the container.
2222 Annotations map [string ]string `json:"annotations,omitempty"`
2323
@@ -134,7 +134,6 @@ type Hook struct {
134134// Hooks for container setup and teardown
135135type Hooks struct {
136136 // Prestart is a list of hooks to be run before the container process is executed.
137- // On Linux, they are run after the container namespaces are created.
138137 Prestart []Hook `json:"prestart,omitempty"`
139138 // Poststart is a list of hooks to be run after the container process is started.
140139 Poststart []Hook `json:"poststart,omitempty"`
You can’t perform that action at this time.
0 commit comments