WARNING: MongoDB 5.0+ requires a CPU with AVX support
[root@Container 001.MongoDB]# cat docker_MongoDB.start.sh#!/bin/bash# author:WinJayX# date:2022-01-13# Maintainer WinJayX <WinJayX@Gmail.com># func:MongoDB Docker Con...
·
[root@Container 001.MongoDB]# cat docker_MongoDB.start.sh
#!/bin/bash
# author:WinJayX
# date:2022-01-13
# Maintainer WinJayX <WinJayX@Gmail.com>
# func:MongoDB Docker Container
# !!! -p 参数说明 -p :前的为宿主机的端口,后的为容器业务所需的端口!!!
docker rm -f MongoTest
docker run -d --name MongoTest \
-u root \
-h MongoDB \
-p 27017:27017 \
--restart always \
--volume `pwd`/MongoData:/data/db \
--volume /etc/localtime:/etc/localtime:ro \
-e MONGO_INITDB_ROOT_USERNAME=admin \
-e MONGO_INITDB_ROOT_PASSWORD={YourPassword} \
mongo --auth
重新换地址
mongo:4.4.12-rc0-focal
更多推荐
已为社区贡献1条内容
所有评论(0)