diff options
author | TomSweeneyRedHat <tsweeney@redhat.com> | 2018-02-07 19:23:22 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-02-08 20:17:17 +0000 |
commit | 9e3a5da69d69df223b9f9b8116ad536de3dcb791 (patch) | |
tree | 04fa92196b41beb82ca04946f538d9c30d512575 /cmd/podman | |
parent | 250ec9adc278fb590cc2c288900b81514dfe0bfe (diff) | |
download | podman-9e3a5da69d69df223b9f9b8116ad536de3dcb791.tar.gz podman-9e3a5da69d69df223b9f9b8116ad536de3dcb791.tar.bz2 podman-9e3a5da69d69df223b9f9b8116ad536de3dcb791.zip |
Add some global options to build
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
Closes: #312
Approved by: mheon
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/build.go | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/cmd/podman/build.go b/cmd/podman/build.go index 6e32a80e9..090232364 100644 --- a/cmd/podman/build.go +++ b/cmd/podman/build.go @@ -80,7 +80,26 @@ var ( func buildCmd(c *cli.Context) error { - budCmdArgs := []string{"bud"} + budCmdArgs := []string{} + + logLevel := c.GlobalString("log-level") + if logLevel == "debug" { + budCmdArgs = append(budCmdArgs, "--debug") + } + if c.GlobalIsSet("root") { + budCmdArgs = append(budCmdArgs, "--root", c.GlobalString("root")) + } + if c.GlobalIsSet("runroot") { + budCmdArgs = append(budCmdArgs, "--runroot", c.GlobalString("runroot")) + } + if c.GlobalIsSet("storage-driver") { + budCmdArgs = append(budCmdArgs, "--storage-driver", c.GlobalString("storage-driver")) + } + for _, storageOpt := range c.GlobalStringSlice("storage-opt") { + budCmdArgs = append(budCmdArgs, "--storage-opt", storageOpt) + } + + budCmdArgs = append(budCmdArgs, "bud") if c.IsSet("authfile") { budCmdArgs = append(budCmdArgs, "--authfile", c.String("authfile")) |