Just noted: Sometimes "network:disconnect" throws "unable to find network settings for the network" error.
container.HostConfig.NetworkMode contains value while Networks map key is not exist in container.NetworkSettings .
Example from my case:
container.NetworkSettings equals { "SandboxKey": "/var/run/docker/netns/8a2df831a89f" }container.HostConfig.NetworkMode equals "my_network"
Merge with squash
Just noted: Sometimes "network:disconnect" throws "unable to find network settings for the network" error.
container.HostConfig.NetworkMode
contains value whileNetworks
map key is not exist incontainer.NetworkSettings
. Example from my case:container.NetworkSettings
equals{ "SandboxKey": "/var/run/docker/netns/8a2df831a89f" }
container.HostConfig.NetworkMode
equals"my_network"
Merge with squash