Let's create our MongoDB container. We will use the official image provided by the Docker Hub.
First, we need to pull the image:
docker pull mongo:3.4.10
Then, we will see the Docker Engine downloading the image contents.
To create an isolation from our containers, we will create a separated network for our application and database. The network should use the bridge driver to allow the container communications.
Let's create a docker network:
docker network create cms-application
The command output should be an ID of a created network. Your ID will probably be different compared to mine:
To check if the network was created ...