The installation of Docker (https://www.docker.com/) and how it operates is beyond the scope of this book. It will be of interest to DevOps (in other words, developers and IT operations professionals) to know that the Docker community has created an image (https://hub.docker.com/_/mongo/) in which MongoDB is pre-installed. To use this image, assuming that you have Docker installed, proceed as follows:
- Go to the GitHub page for the Docker mongo image (https://github.com/docker-library/docs/blob/master/mongo/README.md), and choose a tag to use. The list of tags refer to different versions of Windows and Ubuntu Linux. Each tag listed on the GitHub page links to a docker file, so if you are not running either Windows or Ubuntu Linux, it's easy enough to modify the docker file to suit your needs.
- From the Command Prompt/Terminal window, issue this command...