Integrate poststart hooks with spec

* Call poststart hooks after the container is started
* Tie in with spec configuration

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
Mrunal Patel
2015-11-06 18:03:32 -05:00
parent bb2d3cd1be
commit 452e8a73c5
2 changed files with 24 additions and 0 deletions

View File

@@ -712,6 +712,14 @@ func createHooks(rspec *specs.LinuxRuntimeSpec, config *configs.Config) {
}
config.Hooks.Prestart = append(config.Hooks.Prestart, configs.NewCommandHook(cmd))
}
for _, h := range rspec.Hooks.Poststart {
cmd := configs.Command{
Path: h.Path,
Args: h.Args,
Env: h.Env,
}
config.Hooks.Poststart = append(config.Hooks.Poststart, configs.NewCommandHook(cmd))
}
for _, h := range rspec.Hooks.Poststop {
cmd := configs.Command{
Path: h.Path,