Supress making netns symlinks when using host networking

This commit is contained in:
Joel Elkins 2022-08-01 00:06:06 -05:00
parent fa8c732599
commit 38099a8f2d
No known key found for this signature in database
GPG Key ID: 133589DC38921AE2

View File

@ -301,10 +301,12 @@ func (c *Container) StartCommands() cmd.CommandSet {
if err != nil { if err != nil {
return err return err
} }
if c.cdata.HostConfig != nil && c.cdata.HostConfig.NetworkMode == "bridge" {
err = c.assureNetNS() err = c.assureNetNS()
if err != nil { if err != nil {
c.LogEntry().WithField("error", err).Warnln("Failed to create network namespace") c.LogEntry().WithField("error", err).Warnln("Failed to create network namespace")
} }
}
return nil return nil
}), }),
}) })