net=host: remove /var/run/docker/netns/default from OCI config
Prior to this commit, a container running with `--net=host` had `{"type":"network","path":"/var/run/docker/netns/default"}` in the ``.linux.namespaces` field of the OCI Runtime Config, but this wasn't needed. Close issue 47100 Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
parent
4f9c865edd
commit
ed15f1d717
1 changed files with 1 additions and 4 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue