From b1c002342426fac0770e4a7d07a57018964724dd Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Fri, 12 Nov 2021 12:56:57 +0100 Subject: 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 --- pkg/specgen/generate/container_create.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkg/specgen/generate/container_create.go') 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)) } -- cgit v1.2.3-54-g00ecf