Merge pull request #47101 from AkihiroSuda/refactor-47100

net=host: remove /var/run/docker/netns/default from OCI config
This commit is contained in:
Sebastiaan van Stijn 2024-01-18 14:55:53 +01:00 committed by GitHub
commit 982f85b281
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -285,10 +285,7 @@ func WithNamespaces(daemon *Daemon, c *container.Container) coci.SpecOpts {
})
}
case networkMode.IsHost():
setNamespace(s, specs.LinuxNamespace{
Type: specs.NetworkNamespace,
Path: c.NetworkSettings.SandboxKey,
})
oci.RemoveNamespace(s, specs.NetworkNamespace)
default:
setNamespace(s, specs.LinuxNamespace{
Type: specs.NetworkNamespace,