From 81f2602464885361653d69b3f9920b3a2fd6573a Mon Sep 17 00:00:00 2001 From: Mahmoud Zalt Date: Mon, 9 May 2016 04:23:03 +0300 Subject: [PATCH] Support MariaDB closes feature #21 --- README.md | 21 +++++++-------------- docker-compose.yml | 17 +++++++++++++++++ mariadb/Dockerfile | 9 +++++++++ 3 files changed, 33 insertions(+), 14 deletions(-) create mode 100644 mariadb/Dockerfile diff --git a/README.md b/README.md index 77d02525..acae5449 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # LaraDock -[![forthebadge](http://forthebadge.com/images/badges/built-with-love.svg)](http://www.zalt.me) +[![forthebadge](http://forthebadge.com/images/badges/built-by-developers.svg)](http://zalt.me) LaraDock helps you run your **Laravel** App on **Docker** real quick. @@ -110,9 +110,10 @@ Running a virtual Container is much faster than running a full virtual Machine. - PHP (7.0 - 5.6 - 5.5) - NGINX +- Redis - MySQL - PostgreSQL -- Redis +- MariaDB - Data Volume Cannot find your container! we would love to have it as well. Consider contributing your container and adding it to this list. @@ -186,7 +187,7 @@ Note: you can choose your own combination of software's (containers), another ex docker-compose up -d php nginx postgres redis ``` -Supported Containers: `php`, `nginx`, `mysql`, `postgres`, `redis`, `data`. +Supported Containers: `nginx`, `mysql`, `redis`, `postgres`, `mariadb`, `data`, `php`.
3 - Open your browser and visit your `{Docker-IP}` address (`http://xxx.xxx.xxx.xxx`). @@ -414,20 +415,12 @@ The Log files are stored in the `docker/logs` directory. 1 - first list the current running containers with `docker ps` -2 - enter any container with: - -Example: enter the `php` container +2 - enter any container using: ```bash -docker exec -it php bash +docker exec -it {container-name-or-id} bash ``` - -Example: enter the `nginx` container - -```bash -docker exec -it nginx bash -``` - +3 - to exit a container, type `exit`.
diff --git a/docker-compose.yml b/docker-compose.yml index bab6da68..1be50859 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,6 +32,7 @@ services: volumes: - /var/lib/mysql - /var/lib/postgres + - /var/lib/mariadb - /var/lib/redis ### MySQL Container ######################################### @@ -65,6 +66,22 @@ services: links: - php +### MariaDB Container ####################################### + + mariadb: + build: ./mariadb + volumes_from: + - data + ports: + - "3306:3306" + environment: + MYSQL_DATABASE: homestead + MYSQL_USER: homestead + MYSQL_PASSWORD: secret + MYSQL_ROOT_PASSWORD: root + links: + - php + ### Redis Container ######################################### redis: diff --git a/mariadb/Dockerfile b/mariadb/Dockerfile new file mode 100644 index 00000000..d798d26c --- /dev/null +++ b/mariadb/Dockerfile @@ -0,0 +1,9 @@ +FROM mariadb:latest + +MAINTAINER Mahmoud Zalt + +VOLUME /var/lib/mariadb + +CMD ["mysqld"] + +EXPOSE 3306