Overview

Docker configuration is done in the YML files, where we should describe what we want and how that should be linked in regards to:

Storage

Network

Ports

Configurations

With docker we can download and run any image from a registry. Currently there are over 3 million dockerized applications including:

Databases

Web Services

Operation Systems and others

You can download and run such images from any registry, but the most popular is: | this one.

Let's start by downloading and installing MySQL database which has been dockerized.

MySQL Configuration

Once we have docker installed, we can search and install any image we want:

By default the “hello-world” image is always installed and can be run as follows:

Now we can install the mysql image as follows:

We can check installed images of course and see how much space they occupy:

We can see now, that I have installed 2 mysqls, we can initiate a new container for mysql image as follows:

We can check the logs of the installation as follows:

Finally, we can connect to the mysql, by running the mysql command from the docker:

Mongo Configuration

Other configuration which can use is for Mongo database:

In case of changes, you have to restart the container is follows: