Browse Source

Hopefully, changing order of mysql_install will properly prime mysql.

master
Jonathan Rosenbaum 10 years ago
parent
commit
5ffed9ddf3
  1. 11
      Dockerfile

11
Dockerfile

@ -14,17 +14,18 @@ RUN cd /var/www/html/; \
COPY YBDB.php /var/www/html/Connections/ COPY YBDB.php /var/www/html/Connections/
# COPY populate.sql /var/www/html/sql/ # COPY populate.sql /var/www/html/sql/
# 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; \ RUN service mysql start; \
mysql_install_db; \
mysqladmin create ybdb; \ mysqladmin create ybdb; \
mysql -e "GRANT ALL PRIVILEGES ON ybdb.* TO 'admin'@'%' IDENTIFIED BY 'yblcatx' with grant option"; \ 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/MySQL_Structure.sql; \
mysql ybdb < /var/www/html/sql/populate.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 mysql.conf /etc/supervisor/conf.d/
COPY apache2.conf /etc/supervisor/conf.d/ COPY apache2.conf /etc/supervisor/conf.d/

Loading…
Cancel
Save