summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-03-29 11:01:47 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-04-05 14:13:49 +0000
commitfdcf633a33bbbfbc99268965ef5da03a4770619b (patch)
tree59be1ab815261e106220a4691766830b58657ac0 /cmd/podman
parentca3b2414516c04125f986775c0cbce27f0f1e505 (diff)
downloadpodman-fdcf633a33bbbfbc99268965ef5da03a4770619b.tar.gz
podman-fdcf633a33bbbfbc99268965ef5da03a4770619b.tar.bz2
podman-fdcf633a33bbbfbc99268965ef5da03a4770619b.zip
Add hooks support to podman
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #155 Approved by: mheon
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/main.go7
-rw-r--r--cmd/podman/spec.go1
-rw-r--r--cmd/podman/utils.go1
3 files changed, 8 insertions, 1 deletions
diff --git a/cmd/podman/main.go b/cmd/podman/main.go
index 2a0ca30ee..ef11f7905 100644
--- a/cmd/podman/main.go
+++ b/cmd/podman/main.go
@@ -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"
@@ -123,6 +124,12 @@ func main() {
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",
Value: "error",
diff --git a/cmd/podman/spec.go b/cmd/podman/spec.go
index 014919e17..5e98d5b50 100644
--- a/cmd/podman/spec.go
+++ b/cmd/podman/spec.go
@@ -378,7 +378,6 @@ func createConfigToOCISpec(config *createConfig) (*spec.Spec, error) {
}
/*
- Hooks: &configSpec.Hooks{},
//Annotations
Resources: &configSpec.LinuxResources{
BlockIO: &blkio,
diff --git a/cmd/podman/utils.go b/cmd/podman/utils.go
index 4c42c8ff5..8b59e1344 100644
--- a/cmd/podman/utils.go
+++ b/cmd/podman/utils.go
@@ -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?