Steps to build specific version MongoDB server [Docker Edition]
I’ll introduce the steps to build a specific version MongoDB server with Docker.
docker run -d --name mongo3.0.12 -p 27017:27017 mongo:3.0.12
Assuming the mongo command is installed in the local environment with something like brew install mongodb, you can check the connection with the following command:
$ mongo
MongoDB shell version: 3.0.15
connecting to: test
> db.version()
3.0.12
The MongoDB shell version: 3.0.15 part is the cli version installed with brew install [email protected]. The MongoDB server version is the result of db.version().
That’s all from the Gemba where I occasionally want to use older versions of MongoDB.