当前位置:Gxlcms > 数据库问题 > 使用docker容器运行mongodb

使用docker容器运行mongodb

时间:2021-07-01 10:21:17 帮助过:50人阅读

原文作者: xingguang
原文链接:https://www.tiance.club/post/2627105888.html

使用docker容器运行mongodb

1、下载Mongodb的官方docker镜像

docker pull mongo:latest

2、启动一个Mongodb服务器容器

docker run --name mongodb -v /mongodb/data:/data/db -d mongo:latest

--name mongodb 容器名称
-v /mongodb/data:/data/db -->挂载数据目录
-d -->后台运行容器

查看mongodb容器日志

docker logs mongodb

原文作者: xingguang
原文链接:https://www.tiance.club/post/2627105888.html

使用docker容器运行mongodb

标签:name   latest   下载   tps   docker镜像   mon   链接   --   作者   

人气教程排行