mirror of
https://github.com/containers/podman.git
synced 2025-12-10 15:47:46 +08:00
Add hooks support to podman
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #155 Approved by: mheon
This commit is contained in:
committed by
Atomic Bot
parent
ca3b241451
commit
fdcf633a33
@@ -7,6 +7,7 @@ import (
|
||||
|
||||
"github.com/containers/storage/pkg/reexec"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/projectatomic/libpod/pkg/hooks"
|
||||
"github.com/projectatomic/libpod/version"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/urfave/cli"
|
||||
@@ -122,6 +123,12 @@ func main() {
|
||||
Name: "cpu-profile",
|
||||
Usage: "path for the cpu profiling results",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "hooks-dir-path",
|
||||
Usage: "set the OCI hooks directory path",
|
||||
Value: hooks.DefaultHooksDir,
|
||||
Hidden: true,
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "log-level",
|
||||
Usage: "log messages above specified level: debug, info, warn, error (default), fatal or panic",
|
||||
|
||||
@@ -378,7 +378,6 @@ func createConfigToOCISpec(config *createConfig) (*spec.Spec, error) {
|
||||
}
|
||||
|
||||
/*
|
||||
Hooks: &configSpec.Hooks{},
|
||||
//Annotations
|
||||
Resources: &configSpec.LinuxResources{
|
||||
BlockIO: &blkio,
|
||||
|
||||
@@ -48,6 +48,7 @@ func getRuntime(c *cli.Context) (*libpod.Runtime, error) {
|
||||
if c.GlobalIsSet("cni-config-dir") {
|
||||
options = append(options, libpod.WithCNIConfigDir(c.GlobalString("cni-config-dir")))
|
||||
}
|
||||
options = append(options, libpod.WithHooksDir(c.GlobalString("hooks-dir-path")))
|
||||
|
||||
// TODO flag to set CNI plugins dir?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user