diff --git a/docker/mysql/Dockerfile b/docker/mysql/Dockerfile index c969a5c..a3de886 100644 --- a/docker/mysql/Dockerfile +++ b/docker/mysql/Dockerfile @@ -1,11 +1,20 @@ -FROM php:7 -RUN apt-get update -y && apt-get install -y openssl zip unzip git netcat libpng-dev -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -RUN docker-php-ext-install pdo pdo_mysql -RUN docker-php-ext-install gd -WORKDIR /app -COPY . /app -RUN composer update -ADD start.sh /start.sh -CMD ["/start.sh"] +ARG MYSQL_VERSION=latest +FROM mysql:${MYSQL_VERSION} +LABEL maintainer="Mahmoud Zalt " + +##################################### +# Set Timezone +##################################### + +ARG TZ=UTC +ENV TZ ${TZ} +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +RUN chown -R mysql:root /var/lib/mysql/ + +COPY my.cnf /etc/mysql/conf.d/my.cnf + +CMD ["mysqld"] + +EXPOSE 3306