Docker, Oracle

MongoDB Docker Oracle Linux Slim

mongodbWorking for a consulting firm, I have the opportunity to occasionally explore technologies that don’t quite align with my focus area(s). I started looking at MongoDB, and over the last couple of weeks, I’ve found it to be quite fun. This post will focus on my intro to MongoDB and hopefully will result in a number of posts as I find the time to explore more. To continue my exercises in deploying everything in a Docker Container, let’s take a quick look at this, and then later we can look at connecting to it from a separate container.

While you can find Docker images for MongoDB, what I haven’t found is an image using the Oracle’s Linux Slim version, so let’s go with that.

Create a Dockerfile:

Create the mongodb-org-3.4.repo.

MongoDB is not included in the YUM repo so we will need to add the mongodb repo to the /etc/yum.repos.d/ directory. In the same directory as the Dockerfile, create the following file: mongodb-org-3.4.repo

That’s it! The only thing remaining is to build and run the image.

In the directory with the Dockerfile and the mongodb-org-3.4.repo file execute the docker build command

With the build completed successfully, run the new image and launch the mongoDB server.

or include it in the command line

Done. dbaontap mongodb


Also published on Medium.