

# Runnning Mariadb as docker



* After CLoning this repo, go to mariadb folder under databases.
* Run following command to build the docker image.

`docker build -t my-custom-db -f db.Dockerfile .`

* The build image can be seen in the docker images list with below command.

`docker image ls`

* Now create the docker container, also pass the necessary environment variables for initial settings. Following command is given as example.

`docker run -d --name my-custom-db -p 3306:3306 -e MYSQL_ROOT_PASSWORD=YOUR_ROOT_PASSWORD -e MYSQL_DATABASE=Devops -e MYSQL_USER=admin -e MYSQL_PASSWORD=YOUR_USER_PASSWORD db1`

* MariaDB docker container is up and running. 