summaryrefslogtreecommitdiff
path: root/pkg/specgen/generate/container_create.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-11-12 16:55:24 +0100
committerGitHub <noreply@github.com>2021-11-12 16:55:24 +0100
commit07f5a94711f602ad625e6e82e5653502a7cdb7dc (patch)
treedd25ec28a14f68a7f910f770501a142b1354e3f5 /pkg/specgen/generate/container_create.go
parent19c79eeff3c7945bea81de309874365cf916bedd (diff)
parentb1c002342426fac0770e4a7d07a57018964724dd (diff)
downloadpodman-07f5a94711f602ad625e6e82e5653502a7cdb7dc.tar.gz
podman-07f5a94711f602ad625e6e82e5653502a7cdb7dc.tar.bz2
podman-07f5a94711f602ad625e6e82e5653502a7cdb7dc.zip
Merge pull request #12279 from mscherer/fix_11842
Always create working directory when using compat API
Diffstat (limited to 'pkg/specgen/generate/container_create.go')
-rw-r--r--pkg/specgen/generate/container_create.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/specgen/generate/container_create.go b/pkg/specgen/generate/container_create.go
index 9f398a0ed..f3dc28b01 100644
--- a/pkg/specgen/generate/container_create.go
+++ b/pkg/specgen/generate/container_create.go
@@ -378,6 +378,9 @@ func createContainerOptions(ctx context.Context, rt *libpod.Runtime, s *specgen.
if s.WorkDir == "" {
s.WorkDir = "/"
}
+ if s.CreateWorkingDir {
+ options = append(options, libpod.WithCreateWorkingDir())
+ }
if s.StopSignal != nil {
options = append(options, libpod.WithStopSignal(*s.StopSignal))
}