diff options
-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")) |