Skip to content

Commit 9af4fa5

Browse files
wkingMa Shimiao
authored andcommitted
config: Consistent Markdown/Go wording for 'hooks'
The new wording isn't particularly close to either of the old wordings, but it reads more clearly to me. I've also added our usual: (<type>, <required|optional>) to the Markdown so folks can see that this is an optional object (although see [1] for a more complete version). [1]: opencontainers#427 Subject: config: Explicitly list 'hooks' as optional Signed-off-by: W. Trevor King <[email protected]>
1 parent 184d182 commit 9af4fa5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

config.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ _Note: For Solaris, uid and gid specify the uid and gid of the process inside th
251251

252252
## Hooks
253253

254+
**`hooks`** (object, optional) configures callbacks for container lifecycle events.
254255
Lifecycle hooks allow custom events for different points in a container's runtime.
255256
Presently there are `Prestart`, `Poststart` and `Poststop`.
256257

specs-go/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type Spec struct {
1616
Hostname string `json:"hostname,omitempty"`
1717
// Mounts configures additional mounts (on top of Root).
1818
Mounts []Mount `json:"mounts,omitempty"`
19-
// Hooks are the commands run at various lifecycle events of the container.
19+
// Hooks configures callbacks for container lifecycle events.
2020
Hooks Hooks `json:"hooks"`
2121
// Annotations is an unstructured key value map that may be set by external tools to store and retrieve arbitrary metadata.
2222
Annotations map[string]string `json:"annotations,omitempty"`

0 commit comments

Comments
 (0)