How to start a mongodb shell in docker container?

后端 未结 3 1507
故里飘歌
故里飘歌 2020-12-22 19:12

To start the container, I am typing the following command:

sudo docker run -i -t -p 28000:27017 mongo:latest /usr/bin/mongod --smallfiles

B

3条回答
  •  -上瘾入骨i
    2020-12-22 19:41

    This is an alternate way: Open a new terminal

    mongo 127.0.0.1:28000
    

    Your mongo shell starts in this terminal now.

提交回复
热议问题