- docker create -v /data/db --name dbstore mongo bin/true
- docker run -d -p 30001:27017 --name mgodb --volumes-from dbstore mongo mongod
or if we want to run as a replica set first create a network so that all instances can talk to each other:
- docker create network my-mongo-cluster