docker移除镜像:
docker安装软件:
docker安装MongoDB
1 pull镜像: docker pull registry.docker-cn.com/library/mongo
2 创建data文件夹: mkdir /data/mongodb0
3 运行容器: docker run --name mongodb-server0 -v /data/mongodb0:/data/db -p 27017:27017 -d 镜像ID --auth
4 进入控制台:docker exec -it {mongodb name} mongo admin
5 创建用户 db.createUser({ user: '1iURI', pwd: 'rootroot', roles: [ { role: "userAdminAnyDatabase", db: "admin" } ] });