From 8ec780d30a2b58d5db403e0ea2855bdf85461b96 Mon Sep 17 00:00:00 2001 From: Stephen Cox Date: Sun, 2 Jul 2017 11:04:54 +0100 Subject: [PATCH] Use MySQL 5.7 --- README.md | 2 ++ docker-compose.yml | 7 ++++--- etc/mysql/my.cnf | 2 +- images/mysql/Dockerfile | 5 +++-- images/mysql/config/{my.cnf => docker.cnf} | 7 ------- images/mysql/config/overrides.cnf | 6 ++++++ 6 files changed, 16 insertions(+), 13 deletions(-) rename images/mysql/config/{my.cnf => docker.cnf} (80%) create mode 100644 images/mysql/config/overrides.cnf diff --git a/README.md b/README.md index 506b4c3..626457a 100644 --- a/README.md +++ b/README.md @@ -38,5 +38,7 @@ docker build images/apache2_php5/ -t dockerdrupaldev/apache2-php5:latest docker build images/apache2_php7/ -t dockerdrupaldev/apache2-php7:latest docker build images/cli_tools_php5/ -t dockerdrupaldev/cli-tools-php5:latest docker build images/cli_tools_php7/ -t dockerdrupaldev/cli-tools-php7:latest +docker build images/mysql/ -t dockerdrupaldev/mysql:latest +docker build images/web_tools/ -t dockerdrupaldev/web-tools:latest docker build images/varnish/ -t dockerdrupaldev/varnish:latest ``` diff --git a/docker-compose.yml b/docker-compose.yml index 80d36df..bdf125d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,11 +19,11 @@ services: volumes: - ./sites:/var/www - apache_logs:/var/log/apache2 - - ./etc/PHP/docker.ini:/etc/php/5.6/conf.d/docker.ini + - ./etc/php/docker.ini:/etc/php/5.6/conf.d/docker.ini # Database server db: - build: images/mysql + image: dockerdrupaldev/mysql:latest hostname: mysql environment: - MYSQL_ROOT_PASSWORD=root @@ -31,6 +31,7 @@ services: - "3306:3306" volumes: - mysql:/var/lib/mysql + - ./etc/mysql/my.cnf:/etc/mysql/conf.d/95-overrides.cnf # Email catcher mailcatcher: @@ -42,7 +43,7 @@ services: # Web development tools web_tools: - build: images/web_tools + image: dockerdrupaldev/web-tools:latest hostname: web-tools links: - db:mysql diff --git a/etc/mysql/my.cnf b/etc/mysql/my.cnf index c1e4a46..96384f3 100644 --- a/etc/mysql/my.cnf +++ b/etc/mysql/my.cnf @@ -1,6 +1,6 @@ ## # Docker Drupal Development # -# MySQL override config +# Override MySQL default config [mysqld] diff --git a/images/mysql/Dockerfile b/images/mysql/Dockerfile index 69c5bc5..1aca558 100644 --- a/images/mysql/Dockerfile +++ b/images/mysql/Dockerfile @@ -3,11 +3,12 @@ # # Database server container -FROM mysql:5.5 +FROM mysql:5.7 LABEL maintainer="web@stephencox.net" -ADD config/my.cnf /etc/mysql/conf.d/my.cnf +ADD config/docker.cnf /etc/mysql/conf.d/90-docker.cnf +ADD config/overrides.cnf /etc/mysql/conf.d/95-overrides.cnf VOLUME /var/lib/mysql diff --git a/images/mysql/config/my.cnf b/images/mysql/config/docker.cnf similarity index 80% rename from images/mysql/config/my.cnf rename to images/mysql/config/docker.cnf index 60746ba..1bcca9e 100644 --- a/images/mysql/config/my.cnf +++ b/images/mysql/config/docker.cnf @@ -5,12 +5,6 @@ [mysqld] -bind-address=0.0.0.0 -console=1 -general_log=1 -general_log_file=/dev/stdout -log_error=/dev/stderr - # Defaults character_set_server = utf8 collation_server = utf8_general_ci @@ -28,4 +22,3 @@ max_connections = 320 query_cache_limit = 1M query_cache_size = 16M sync_binlog = 1 -table_cache = 500 diff --git a/images/mysql/config/overrides.cnf b/images/mysql/config/overrides.cnf new file mode 100644 index 0000000..d696541 --- /dev/null +++ b/images/mysql/config/overrides.cnf @@ -0,0 +1,6 @@ +## +# Docker Drupal Development +# +# Override config + +[mysqld]