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 @@ -356,7 +356,8 @@ Runtime implementations MAY support any valid values for platform-specific field
356
356
357
357
## <a name =" configHooks " />Hooks
358
358
359
- Hooks allow for the configuration of custom actions related to the [ lifecycle] ( runtime.md#lifecycle ) of the container.
359
+ Hooks allow for the configuration of custom actions related to the [ lifecycle] ( runtime.md#lifecycle ) of the container if supported by the platform.
360
+ On Linux, they are run after the container namespaces are created.
360
361
361
362
* ** ` hooks ` ** (object, OPTIONAL) MAY contain any of the following properties:
362
363
* ** ` 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 {
17
17
// Mounts configures additional mounts (on top of Root).
18
18
Mounts []Mount `json:"mounts,omitempty"`
19
19
// Hooks configures callbacks for container lifecycle events.
20
- Hooks * Hooks `json:"hooks,omitempty"`
20
+ Hooks * Hooks `json:"hooks,omitempty" platform:"linux,solaris" `
21
21
// Annotations contains arbitrary metadata for the container.
22
22
Annotations map [string ]string `json:"annotations,omitempty"`
23
23
@@ -134,7 +134,6 @@ type Hook struct {
134
134
// Hooks for container setup and teardown
135
135
type Hooks struct {
136
136
// 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.
138
137
Prestart []Hook `json:"prestart,omitempty"`
139
138
// Poststart is a list of hooks to be run after the container process is started.
140
139
Poststart []Hook `json:"poststart,omitempty"`
You can’t perform that action at this time.
0 commit comments