mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-11-24 08:52:31 +02:00
.. | ||
docker-compose.yml | ||
README.md |
mongo
MongoDB is an open-source, document database designed for ease of development and scaling.
up and running
$ pwgen -1 8 1
Aedahwa7
$ docker-compose up -d
$ docker-compose cp mongo:/usr/bin/mongo /usr/local/bin/
$ mongo mongodb://root:root@localhost:27017/admin
>>> use mydb
>>> db.createUser({user: 'myuser', pwd: 'Aedahwa7', roles: [{role: 'readWrite', db: 'mydb'}]})
>>> exit
$ mongo mongodb://myuser:Aedahwa7@localhost:27017/mydb
>>> show collections
>>> exit