Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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