title: Connect to mongodb running inside Docker
body: <p>I am using Windows 10 </p>
  
  <p>I have installed Virtual Box </p>
  
  <p>In virtual Box I have installed Ubuntu with network setting as Bridge Network</p>
  
  <p>I am using Docker Toolbox for Windows to Start Docker </p>
  
  <p>In Docker I have Mongodb container running at default port </p>
  
  <p>I am doing all my development stuff inside Ubuntu installed in Virtual Box </p>
  
  <p>Here is my Terminal Log </p>
  
  <pre><code>$ docker-machine ls
  NAME      ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER        ERRORS
  default   *        virtualbox   Running   tcp://192.168.99.100:2376           v17.06.0-ce
  
  
  $ docker-machine env
  export DOCKER_TLS_VERIFY="1"
  export DOCKER_HOST="tcp://192.168.99.100:2376"
  export DOCKER_CERT_PATH="C:\Users\test\.docker\machine\machines\default"
  export DOCKER_MACHINE_NAME="default"
  export COMPOSE_CONVERT_WINDOWS_PATHS="true"
  # Run this command to configure your shell:
  # eval $("C:\Program Files\Docker Toolbox\docker-machine.exe" env)
  
  
  $ docker ps
  CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
  77427d4fc49b        mongo               "/bin/sh -c '/usr/..."   About an hour ago   Up 45 minutes                           mongo
  </code></pre>
  
  <p><strong>Issue is I dont know how to Connect to this container running MongoDB globally say from Ubuntu running on Virtual Box</strong>  </p>
  
  <p><strong>Edit 1:</strong></p>
  
  <p>Terminal Log from Ubuntu </p>
  
  <pre><code>test@test-VirtualBox:~$ ip addr show
  1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      inet 127.0.0.1/8 scope host lo
         valid_lft forever preferred_lft forever
      inet6 ::1/128 scope host 
         valid_lft forever preferred_lft forever
  2: enp0s3: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
      link/ether 08:00:27:e1:c8:be brd ff:ff:ff:ff:ff:ff
      inet 192.168.1.27/24 brd 192.168.1.255 scope global dynamic enp0s3
         valid_lft 78034sec preferred_lft 78034sec
      inet6 fe80::2ae9:9e0c:d9a3:f044/64 scope link 
         valid_lft forever preferred_lft forever
  3: docker0: &lt;NO-CARRIER,BROADCAST,MULTICAST,UP&gt; mtu 1500 qdisc noqueue state DOWN group default 
      link/ether 02:42:3d:79:a8:7f brd ff:ff:ff:ff:ff:ff
      inet 172.17.0.1/16 scope global docker0
         valid_lft forever preferred_lft forever
  </code></pre>