title: App running in container cannot connect to couchbase on VM localhost
body: <p>Ive a simple webapp running on docker container which makes DB connection to couchbase. </p>
  
  <p>My couchbase is currently running on a VM localhost. (not another container).</p>
  
  <p>I tried issue a command </p>
  
  <pre><code>docker run --net=host -p 8081:8081 {**image-name-one**}  // This connects without issue
  </code></pre>
  
  <p>Now, I need another instance of the same app but different port and for that I created a bridge network with ip - 192.168.0.1 then modified connection string to use network ip</p>
  
  <pre><code>docker network create -d bridge --subnet 192.168.0.0/24 --gateway 192.168.0.1 test
  </code></pre>
  
  <p>Now, I tried running 2nd container with below ports</p>
  
  <pre><code>docker run --net=test -p 8083:8081 {**2nd-image-name**}  // This will never connect to the database
  </code></pre>
  
  <p>Any insight would be greatly helpful.</p>