Using Docker instead of Vagrant in MongoDB University m103 course

Purpose of this repository

This project aims to allow user that are already using Docker to perform m103 course from MongoDB University instead of using Vagrant.

How it works

First build the image:

docker build -t local/m103mongosrv .

Create the network:

docker network create --subnet 192.168.0.0/16 m103

Run the container:

docker run -dt --rm --name m103 --net m103 --ip 192.168.103.100 --cpus 2 -v PATH/TO/YOUR/PROJECT/DIR/shared:/shared local/m103mongosrv

This image does not run mongod by default. It only create the container and keep it alive so you can exec a bash on it and then launch mongod with the different configuration you need.

To connect to the machine, instead of vagrant ssh:

docker exec -ti m103 bash