Skip to content

gf3/docker-mongosh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Docker mongosh

A docker image for the MongoDB Shell.

The MongoDB Shell, mongosh, is a fully functional JavaScript environment for interacting with MongoDB deployments. You can use the MongoDB Shell to test queries and operations directly with your database.

Note: Built on mongosh 0.5.2

Using

Pull the docker image.

docker pull gianni/mongosh:latest

Alias it in your shell.

Bash:

alias mongosh='docker run -it --rm --network host -v $(pwd):/root mongosh:latest'

Fish:

alias mongosh 'docker run -it --rm --network host -v (pwd):/root mongosh:latest'

And finally, run it as you typically would.

mongosh "mongodb://mongo-host:27017/database"
...
.load ./myFile.js

Building

git clone git@github.com:gf3/docker-mongosh.git
cd docker-mongosh
docker build -t mongosh:latest .
docker run -it --rm mongosh:latest

About

Docker image for mongosh

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published