1 安装mongoDB docker run --name db -d mongo:latest mongod --port 27017 --replSet rs01
2 设置mongoDB打开副本集 echo -e "replication:\n replSetName: "rs01"" | tee -a /etc/mongod.conf
3 mongoDB副本集初始化 rs.initiate({ _id: 'rs01', members: [ { _id: 0, host: 'localhost:27017' } ]})
4 安装rocket.chat docker run --name rocketchat -p 80:3000 --env ROOT_URL=http://localhost -e MONGO_OPLOG_URL=mongodb://172.17.0.4:27017/local?replSet=rs01 --link db -d rocket.chat