title: Docker - Container cannot be connected to network endpoints
body: <p>I am getting the following error when running a contaner by attaching to network interfaces test-net, sample-net,bridge0 . 
  My requirement is to have a container that connects to different containers those are in different networks.</p>
  
  <pre><code>    docker network create --driver bridge sample-net
      docker container run --name c3 -d --network test-net alpine:latest ping 127.0.0.1
      docker network create --driver bridge --subnet "10.1.0.0/16" test-net
      docker container run --name c4 -d --network test-net alpine:latest ping 127.0.0.1
  
      docker container run --name c1 -it --rm alpine:latest sh
      docker container run --name c5 -d --network sample-net --network test-net --network docker0 alpine:latest ping 127.0.0.1
  </code></pre>
  
  <p>My intention is to connect "c5" with all other containers by connecting to their interfaces. However , I am facing the error while executing the command</p>
  
  <pre><code>docker container run --name c5 -d --network sample-net --network test-net --network docker0 alpine:latest ping 127.0.0.1
  
     docker: Error response from daemon: Container cannot be connected to network endpoints: sample-net, test-net, docker0.
  </code></pre>