summaryrefslogtreecommitdiff
path: root/cmd/podman/create.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/create.go')
-rw-r--r--cmd/podman/create.go6
1 files changed, 4 insertions, 2 deletions
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
}