一、拉取
docker pull mongo
二、启动
docker run -d --name mongo -p 27017:27017 -v /home/docker/mongo/db:/data/db -e MONGO_INITDB_ROOT_USERNAME=admin -e MONGO_INITDB_ROOT_PASSWORD=admin --restart=always mongo
2022-07-20 09:07:15
docker pull mongo
docker run -d --name mongo -p 27017:27017 -v /home/docker/mongo/db:/data/db -e MONGO_INITDB_ROOT_USERNAME=admin -e MONGO_INITDB_ROOT_PASSWORD=admin --restart=always mongo