From 2064c37a16ff614b1069ad582229eefd72c605aa Mon Sep 17 00:00:00 2001 From: Billy Brawner Date: Thu, 26 May 2016 16:05:29 -0500 Subject: [PATCH] Fixed remote connections with both PHPMyAdmin and MySQL Workbench/other third party tools --- Dockerfile | 11 ++- config/config.inc.php | 156 ++++++++++++++++++++++++++++++++++++++++++ config/my.cnf | 4 +- 3 files changed, 167 insertions(+), 4 deletions(-) create mode 100755 config/config.inc.php mode change 100644 => 100755 config/my.cnf diff --git a/Dockerfile b/Dockerfile index 2fc376c..f9482ea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,15 +8,19 @@ wget curl git # Configure apache COPY ./config/apache2.conf /etc/apache2/apache2.conf -RUN chmod 600 /etc/apache2/apache2.conf +RUN chmod 644 /etc/apache2/apache2.conf RUN a2enmod rewrite # Configure MySQL COPY ./config/my.cnf /etc/mysql/my.cnf -RUN chmod 600 /etc/mysql/my.cnf +RUN chmod 644 /etc/mysql/my.cnf RUN service mysql start && mysql -u root --execute="GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '';" EXPOSE 3306 +# Configure PHPMyAdmin +COPY ./config/config.inc.php /etc/phpmyadmin/config.inc.php +RUN chmod 644 /etc/phpmyadmin/config.inc.php + # Install composer RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \ php -r "if (hash_file('SHA384', 'composer-setup.php') === '92102166af5abdb03f49ce52a40591073a7b859a86e8ff13338cf7db58a19f7844fbc0bb79b2773bf30791e935dbd938') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \ @@ -45,4 +49,7 @@ ENV APACHE_PID_FILE=/var/run/apache2/apache2.pid ENV APACHE_RUN_USER=www-data ENV APACHE_RUN_GROUP=www-data ENV APACHE_LOG_DIR=/var/log/apache2 + +# Fire up the image! +WORKDIR /var/www/html ENTRYPOINT service mysql start; apache2 -DFOREGROUND diff --git a/config/config.inc.php b/config/config.inc.php new file mode 100755 index 0000000..718f60c --- /dev/null +++ b/config/config.inc.php @@ -0,0 +1,156 @@ +