Skip to content

Commit

Permalink
fix hooks man and help
Browse files Browse the repository at this point in the history
Signed-off-by: Ma Shimiao <[email protected]>
  • Loading branch information
Ma Shimiao committed Oct 17, 2016
1 parent 4b20669 commit 2f7d834
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
6 changes: 3 additions & 3 deletions cmd/oci-runtime-tool/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ var generateFlags = []cli.Flag{
cli.StringFlag{Name: "os", Value: runtime.GOOS, Usage: "operating system the container is created for"},
cli.StringFlag{Name: "output", Usage: "output file (defaults to stdout)"},
cli.StringFlag{Name: "pid", Usage: "pid namespace"},
cli.StringSliceFlag{Name: "poststart", Usage: "path to poststart hooks"},
cli.StringSliceFlag{Name: "poststop", Usage: "path to poststop hooks"},
cli.StringSliceFlag{Name: "prestart", Usage: "path to prestart hooks"},
cli.StringSliceFlag{Name: "poststart", Usage: "set command to run in poststart hooks"},
cli.StringSliceFlag{Name: "poststop", Usage: "set command to run in poststop hooks"},
cli.StringSliceFlag{Name: "prestart", Usage: "set command to run in prestart hooks"},
cli.BoolFlag{Name: "privileged", Usage: "enable privileged container settings"},
cli.BoolFlag{Name: "read-only", Usage: "make the container's rootfs read-only"},
cli.StringFlag{Name: "root-propagation", Usage: "mount propagation for root"},
Expand Down
27 changes: 15 additions & 12 deletions man/oci-runtime-tool-generate.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,18 +182,21 @@ read the configuration from `config.json`.
The special *PATH* `host` removes any existing PID namespace from
the configuration.

**--poststart**=CMD
Path to command to run in poststart hooks. This command will be run before
the container process gets launched but after the container environment and
main process has been created.

**--poststop**=CMD
Path to command to run in poststop hooks. The command will be run
after the container process is stopped.

**--prestart**=CMD
Path to command to run in prestart hooks. This command will be run before
the container process gets launched but after the container environment.
**--poststart**=CMD[:ARGS...]
Set command to run in poststart hooks. Can be specified multiple times.
The multiple commands will be run in order before the container process
gets launched but after the container environment and main process has been
created.

**--poststop**=CMD[:ARGS...]
Set command to run in poststop hooks. Can be specified multiple times.
The multiple commands will be run in order after the container process
is stopped.

**--prestart**=CMD[:ARGS...]
Set command to run in prestart hooks. Can be specified multiple times.
The multiple commands will be run in order after the container process
has been created but before it executes the user-configured code.

**--privileged**=true|false
Give extended privileges to this container. The default is *false*.
Expand Down

0 comments on commit 2f7d834

Please sign in to comment.