sameersbn / docker-mongodb

Dockerfile to build a MongoDb container image which can be linked to other containers.
MIT License
47 stars 50 forks source link

How to run mongo command? #4

Closed xueyuchen closed 8 years ago

xueyuchen commented 8 years ago

How to run mongo command? I want create user in mongo command line. THX!

sameersbn commented 8 years ago

mongo client was not included in the image. It has now been added.

To launch the client you can use docker exec -it mongodb mongo or link the container to a client container, docker run -it --rm --link mongodb:mongo sameersbn/mongodb mongo -h mongo

edit: please note that this image is not being actively maintained. Please take a look at the actively maintained bitnami/mongodb image.