diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2018-03-15 14:04:08 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-03-15 18:24:37 +0000 |
commit | 4bc166446d61f9fde69c91e73b6043b8ba9040fc (patch) | |
tree | 3cf106005bcdd116a951111d24ff33fe12755dd9 /cmd/podman/create.go | |
parent | 99b959560aee809cbd72f71947e934ee76b23ef3 (diff) | |
download | podman-4bc166446d61f9fde69c91e73b6043b8ba9040fc.tar.gz podman-4bc166446d61f9fde69c91e73b6043b8ba9040fc.tar.bz2 podman-4bc166446d61f9fde69c91e73b6043b8ba9040fc.zip |
We should not have a default workdir
Having a default workdir is causing us not to use the
container images workdir.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Closes: #501
Approved by: mheon
Diffstat (limited to 'cmd/podman/create.go')
-rw-r--r-- | cmd/podman/create.go | 6 |
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 } |