Docker + mongoDB

1. docker pull mongo

2. run

docker run --name mymogo -d mongo --auth

3. login

docker exec -it mymogo mongo admin

Output:

jory@jory-Vostro-3660:~$ sudo docker exec -it mymogo mongo admin
MongoDB shell version v4.0.3
connecting to: mongodb://127.0.0.1:27017/admin
Implicit session: session { "id" : UUID("add4f7aa-4910-46d1-bdb7-5dff4f6d7a96") }
MongoDB server version: 4.0.3
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
	http://docs.mongodb.org/
Questions? Try the support group
	http://groups.google.com/group/mongodb-user

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章