Challenge: Running MongoDB Database

Test if you can run the MongoDB database.

We'll cover the following

MongoDB

Find the official image on the Docker hub for MongoDB and launch its container in the terminal below, fulfilling the following requirements:

  • An interactive container.
  • Should remove the container after the container stops.
  • A container named mongodb.
  • An exposed port of 3000. The default port for MongoDB is 27017.
  • A persistent Docker volume named mongodata. Mount the path /data/db for this container.
  • Set a root user and root password of mysecret.

Get hands-on with 1200+ tech skills courses.