MongoDB is one of the most popular of the NoSQL and Document database systems around – and for good reason. It's easy to get up and running, and it tends to be simple to work with, especially from Node.js
Installing MongoDB into a Docker container is as easy as any other service, as well. But if you're like me, you may have had a previous installation of MongoDB on your computer, directly. If you did, there's a good chance that you'll want to use your existing database files for the MongoDB Docker container.
But, how do you do that?
The answer is found in Docker's “volumes”. This feature allows you to mount a local folder into a folder within the Docker container. The application running inside of the container will read and write directly to the mounted “volume”, allowing you to use existing files on your computer, from inside of the container.
This episode will show you not only how to install and run MongoDB, but also how to use volumes to load your existing MongoDB database files.