Using MongoDB with Docker

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:

  1. 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 ...

Get MongoDB 4 Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.