diff --git a/pkg/selfcontain/config.go b/pkg/selfcontain/config.go index e73b7f2ce16597d899b6a9ec421f4501d87f01b4..f0ce70a5a8126422073d0a5b8d14ed25b0b13546 100644 --- a/pkg/selfcontain/config.go +++ b/pkg/selfcontain/config.go @@ -55,15 +55,15 @@ func (c *Config) toLibcontainer() (*configs.Config, error) { mounts := []*configs.Mount{} for dest, source := range c.Mounts { c.Logger.Info("setting up mount", "source", source, "dest", dest) - err := os.MkdirAll(source, 0o700) - if err != nil && !os.IsExist(err) { - return nil, err - } + // Explicitely ignore errors here, since many error cases are actually + // fine (already exists, not a directory, etc.) and actual issues are caught + // later + os.MkdirAll(source, 0o700) mount := &configs.Mount{ Source: source, Destination: dest, Device: "bind", - Flags: unix.MS_BIND | unix.MS_NOEXEC | unix.MS_NOSUID | unix.MS_NODEV, + Flags: unix.MS_BIND | unix.MS_NOSUID | unix.MS_NODEV, } mounts = append(mounts, mount) }