A dockerized wrapper for the MongoDB Shell.
697
This is a Docker container running MongoDB Shell as a one-line command.
It is meant to be run with the --rm parameter so the container gets discarded right away.
docker run -it --rm -v /path/to/data:/data -v /path/to/.mongorc.js:/home/mongo/.mongorc.js --user $(id -u):$(id -g) casperfrx/mongodb-shell <MongoDB Access URL>
If no MongoDB server URL is given, the command falls back to the --help parameter.
To run the container as if it was a native command, add this line to .bashrc/.profile:
alias mongo="docker run -it --rm -v /path/to/data:/data -v /path/to/.mongorc.js:/home/mongo/.mongorc.js --user $(id -u):$(id -g) casperfrx/mongodb-shell"
Now you can just run:
mongo <MongoDB Access URL>
Content type
Image
Digest
Size
37.8 MB
Last updated
over 6 years ago
docker pull casperfrx/mongodb-shell