From e8968c867f7af21f9e5eec661f7e057a74127511 Mon Sep 17 00:00:00 2001 From: LStandman <65296484+LStandman@users.noreply.github.com> Date: Sat, 12 Feb 2022 13:45:49 +0200 Subject: Add support for --chrootdirs Signed-off-by: LStandman <65296484+LStandman@users.noreply.github.com> --- pkg/specgenutil/specgen.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkg/specgenutil') diff --git a/pkg/specgenutil/specgen.go b/pkg/specgenutil/specgen.go index b037e14cc..b87da61fb 100644 --- a/pkg/specgenutil/specgen.go +++ b/pkg/specgenutil/specgen.go @@ -819,6 +819,9 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *entities.ContainerCreateOptions if !s.UnsetEnvAll { s.UnsetEnvAll = c.UnsetEnvAll } + if len(s.ChrootDirs) == 0 || len(c.ChrootDirs) != 0 { + s.ChrootDirs = c.ChrootDirs + } // Initcontainers if len(s.InitContainerType) == 0 || len(c.InitContainerType) != 0 { -- cgit v1.2.3-54-g00ecf