title: Connecting Robo 3T to Docker MongoDB container
body: <p>As part as an attempt to resolve a Hibernate OGM connection issue, I want to see if I connect from Robo 3T.</p>
  
  <p>I build my MongoDB image and start it running. </p>
  
  <p>docker ps:</p>
  
  <blockquote>
    <p>MacBook-Pro:GoStopHandle NOTiFY$ docker ps CONTAINER ID        IMAGE<br>
    COMMAND                  CREATED             STATUS              PORTS
    NAMES 0375a68b9988        gostophandlemongodb:latest<br>
    "docker-entrypoint.s…"   5 seconds ago       Up 4 seconds<br>
    0.0.0.0:32844->27017/tcp   goStopHandleMongo</p>
  </blockquote>
  
  <p>The IP address of the containers is:</p>
  
  <blockquote>
    <p>docker inspect -f '{{range
    .NetworkSettings.Networks}}{{.IPAddress}}{{end}}'  0375a68b9988
    172.17.0.2</p>
  </blockquote>
  
  <p>I've enter the 'mongo' shell:</p>
  
  <blockquote>
    <p>docker exec -it goStopHandleMongo  mongo admin</p>
  </blockquote>
  
  <p>I add a user &amp; password:</p>
  
  <pre><code>&gt; db.createUser(
  ...   {
  ...     user: "NOTiFY",
  ...     pwd: "MyPassword",
  ...     roles: [ { role: "userAdminAnyDatabase", db: "admin" }, "readWriteAnyDatabase" ]
  ...   }
  ... )
  Successfully added user: {
      "user" : "NOTiFY",
      "roles" : [
          {
              "role" : "userAdminAnyDatabase",
              "db" : "admin"
          },
          "readWriteAnyDatabase"
      ]
  }
  </code></pre>
  
  <p>I then create a connection in Robo 3T:
  <a href="https://i.stack.imgur.com/t5dpb.png" rel="noreferrer"><img src="https://i.stack.imgur.com/t5dpb.png" alt="Robo 3T - create connection"></a></p>
  
  <p>I then set-up the 'Authentication':</p>
  
  <p><a href="https://i.stack.imgur.com/Tt9Qo.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Tt9Qo.png" alt="Authentication"></a></p>
  
  <p>When I try &amp; connect I get:</p>
  
  <p><a href="https://i.stack.imgur.com/K40J2.png" rel="noreferrer"><img src="https://i.stack.imgur.com/K40J2.png" alt="Connection dialog"></a></p>
  
  <p>Any suggestions?</p>