From 5ffed9ddf30ff7f40e042b440fa776ffb5b5274c Mon Sep 17 00:00:00 2001 From: Jonathan Rosenbaum Date: Wed, 31 Dec 2014 08:19:42 +0000 Subject: [PATCH] Hopefully, changing order of mysql_install will properly prime mysql. --- Dockerfile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 800f478..d4576a9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,17 +14,18 @@ RUN cd /var/www/html/; \ COPY YBDB.php /var/www/html/Connections/ # COPY populate.sql /var/www/html/sql/ -RUN service mysql start; \ + +# mysql_install_db solves a problem which occurs if bikebike/bikebike has not +# been updated in a long time where mysql cannot find Table mysql.db when +# started with mysqld_safe + +RUN service mysql start; \ + mysql_install_db; \ mysqladmin create ybdb; \ mysql -e "GRANT ALL PRIVILEGES ON ybdb.* TO 'admin'@'%' IDENTIFIED BY 'yblcatx' with grant option"; \ mysql ybdb < /var/www/html/sql/MySQL_Structure.sql; \ mysql ybdb < /var/www/html/sql/populate.sql; -# This solves a problem which occurs if bikebike/bikebike has not been -# updated in a long time where mysql cannot find Table mysql.db when started -# with mysqld_safe -RUN mysql_install_db; - COPY mysql.conf /etc/supervisor/conf.d/ COPY apache2.conf /etc/supervisor/conf.d/