一、创建Mongo容器并远程访问 (一)创建容器 docker run -d –name mongo –restart=always -p 27017:27017 mongo:4.0 –auth (二)注释bindIp: 127.0.0.1 docker exec -it mongo /bin/bash cat /etc/issue apt-get update apt-get install vim vim etc/mongod.conf.orig #bindIp: 127.0.0.1 docker restart mongo (三)创建用户 docker exec -it mongo mo