Download specific docker image/version for Mongo

It is always good practice to run the latest version of any software you may be using, but from time to time you might require a specific version. As an example you might require version 3.2.8 of the MongoDB Docker image. To download this image you can run the following command:

docker pull mongo:3.2.8

When creating a container, you can make use of this image as follows:

sudo docker run -d -p 27017:27017 –name CONTAINER_NAME mongo:3.2.8

Be sure to replace CONTAINER_NAME with the desired name of your container.