docker进入mongodb
时间: 2023-10-04 12:03:36 浏览: 100
docker--->mongodb安装
要进入正在运行的MongoDB容器,可以使用以下命令:
```
$ docker exec -it <容器ID> mongo
```
其中,<容器ID>是通过运行`docker ps`命令获取到的正在运行的MongoDB容器的ID。这个命令将会打开一个MongoDB的交互式命令行界面,可以在容器内进行MongoDB的操作和查询。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [猿创征文|【云原生 | 25】Docker运行数据库实战之MongoDB](https://blog.csdn.net/qq_62294245/article/details/126569857)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [在 Docker 中运行 Mongodb](https://blog.csdn.net/AHcola233/article/details/127211067)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [docker镜像 mongodb 3.2.4](https://download.csdn.net/download/yunfwe/10219657)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文