N'oubliez pas de mapper le port au port hôte :
docker run --name some-mongo -p 27017:27017 -d mongo
Alors
docker-machine ip
me donne 192.168.99.100
Tapez dans le terminal
mongo 192.168.99.100
impressions
MongoDB shell version: 3.2.4
connecting to: 192.168.99.100/test
Server has startup warnings:
2016-08-22T07:35:20.214+0000 I CONTROL [initandlisten]
2016-08-22T07:35:20.214+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2016-08-22T07:35:20.214+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-08-22T07:35:20.214+0000 I CONTROL [initandlisten]
2016-08-22T07:35:20.214+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2016-08-22T07:35:20.214+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-08-22T07:35:20.214+0000 I CONTROL [initandlisten]
J'ai aussi testé avec robomongo. Je peux me connecter sans problème.