title: How to connect multiple Dockers to different bridges in a single host machine?
body: <p>Is it possible to connect multiple Dockers (in my case, multiple instances of the same docker) each to different bridge in a single host machine?</p>
  
  <p>3rd party solutions like pipework recommends first looking for "native" ways.</p>
  
  <p>Something like that:</p>
  
  <p><img src="https://i.stack.imgur.com/qb7pa.png" alt="enter image description here"></p>
  
  <p>When I start 2 instance, the 1st use by default docker0 bridge, while the 2nd is instructed to use br1 (different IP range) :</p>
  
  <pre><code>sudo docker run -t -i me/tester:latest /bin/bash
  sudo docker --bridge=br1 run -t -i me/tester:latest /bin/bash
  </code></pre>
  
  <p>results in both having the same IP range from Doker0:</p>
  
  <pre><code>root@2a259a88d9c8:/# ip a
  ...
  73: eth0: &lt;BROADCAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
      link/ether 86:d7:cc:c8:b7:e8 brd ff:ff:ff:ff:ff:ff
      inet 172.17.0.32/16 scope global eth0
  </code></pre>
  
  <p>--</p>
  
  <pre><code>root@0b849a5398af:/# ip a
  ...
  79: eth0: &lt;BROADCAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
      link/ether 26:84:ad:6c:70:6b brd ff:ff:ff:ff:ff:ff
      inet 172.17.0.34/16 scope global eth0
         valid_lft forever preferred_lft forever
  </code></pre>