mongodb installation docker
docker pull mongo
创建Mongo专用的文件夹:
cd /opt
mkdir mongodb
cd ./mongodb
mkdir data
mkdir backup
执行如下命令启动MongoDB:
docker run --name mongo -p 27017:27017 -v /opt/mongodb/data:/data/db -v /opt/mongodb/backup:/data/backup -d mongo