summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/common.go1
-rw-r--r--cmd/podman/create.go6
2 files changed, 4 insertions, 3 deletions
diff --git a/cmd/podman/common.go b/cmd/podman/common.go
index 8dee6cb98..60cc48803 100644
--- a/cmd/podman/common.go
+++ b/cmd/podman/common.go
@@ -390,6 +390,5 @@ var createFlags = []cli.Flag{
cli.StringFlag{
Name: "workdir, w",
Usage: "Working `directory inside the container",
- Value: "/",
},
}
diff --git a/cmd/podman/create.go b/cmd/podman/create.go
index b923ad458..462c56a51 100644
--- a/cmd/podman/create.go
+++ b/cmd/podman/create.go
@@ -566,8 +566,10 @@ func parseCreateOpts(c *cli.Context, runtime *libpod.Runtime, imageName string,
}
// WORKING DIRECTORY
- workDir := c.String("workdir")
- if workDir == "" {
+ workDir := "/"
+ if c.IsSet("workdir") {
+ workDir = c.String("workdir")
+ } else if data.ContainerConfig.WorkingDir != "" {
workDir = data.ContainerConfig.WorkingDir
}