From 7ec8b8846eb5de60141c25a94c3895decfdb1164 Mon Sep 17 00:00:00 2001 From: Ryan Hayle Date: Fri, 7 Jul 2017 16:43:06 -0500 Subject: [PATCH] Allow specifying the version of MySQL to install in .env file. --- docker-compose.yml | 2 ++ env-example | 1 + mysql/Dockerfile | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 55d6a18..ee0d4b7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -192,6 +192,8 @@ services: mysql: build: context: ./mysql + args: + - MYSQL_VERSION=${MYSQL_VERSION} environment: - MYSQL_DATABASE=${MYSQL_DATABASE} - MYSQL_USER=${MYSQL_USER} diff --git a/env-example b/env-example index f80de1e..0782818 100644 --- a/env-example +++ b/env-example @@ -90,6 +90,7 @@ PHP_SOCKET=php-fpm:9000 ### MYSQL ############################################################################################################## +MYSQL_VERSION=8.0 MYSQL_DATABASE=default MYSQL_USER=default MYSQL_PASSWORD=secret diff --git a/mysql/Dockerfile b/mysql/Dockerfile index 2061a0b..5eb6c40 100644 --- a/mysql/Dockerfile +++ b/mysql/Dockerfile @@ -1,4 +1,5 @@ -FROM mysql:8.0 +ARG MYSQL_VERSION=8.0 +FROM mysql:${MYSQL_VERSION} MAINTAINER Mahmoud Zalt