summaryrefslogtreecommitdiff
path: root/pkg/specgen/specgen.go
diff options
context:
space:
mode:
authorMichael Scherer <misc@redhat.com>2021-11-12 12:56:57 +0100
committerMichael Scherer <misc@redhat.com>2021-11-12 14:18:26 +0100
commitb1c002342426fac0770e4a7d07a57018964724dd (patch)
tree8da768ae6616ba05f787eadb0861ef4c405a29e6 /pkg/specgen/specgen.go
parent92da8682b3977a6ef57a6f73dde2f2aef6186d19 (diff)
downloadpodman-b1c002342426fac0770e4a7d07a57018964724dd.tar.gz
podman-b1c002342426fac0770e4a7d07a57018964724dd.tar.bz2
podman-b1c002342426fac0770e4a7d07a57018964724dd.zip
Always create working directory when using compat API
Docker/Moby always create the working directory, and some tools rely on that behavior (example, woodpecker/drone). Fixes #11842 Signed-off-by: Michael Scherer <misc@redhat.com>
Diffstat (limited to 'pkg/specgen/specgen.go')
-rw-r--r--pkg/specgen/specgen.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/specgen/specgen.go b/pkg/specgen/specgen.go
index 8a4497130..d777287d7 100644
--- a/pkg/specgen/specgen.go
+++ b/pkg/specgen/specgen.go
@@ -272,6 +272,10 @@ type ContainerStorageConfig struct {
// If unset, the default, /, will be used.
// Optional.
WorkDir string `json:"work_dir,omitempty"`
+ // Create the working directory if it doesn't exist.
+ // If unset, it doesn't create it.
+ // Optional.
+ CreateWorkingDir bool `json:"create_working_dir,omitempty"`
// StorageOpts is the container's storage options
// Optional.
StorageOpts map[string]string `json:"storage_opts,omitempty"`