diff --git a/.dockerignore b/.dockerignore index 76cdb46b7e38e6eebc1a947c6bd2fe07be6df121..50fb4cd3bb98169b35344100b0b428e4962c4bdb 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,8 +1,4 @@ .gitignore CHANGELOG.md -circle.yml -docker-compose.test.yml -docs/ -tests/ -LICENSE -README.md \ No newline at end of file +LICENSE.md +README.md diff --git a/.gitignore b/.gitignore index 9e0b6b963f46911c4987e6a26e1fc9b58c763ace..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +0,0 @@ -.idea -tests/actual \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 474e48cba7be702de8990dcf3d70d9df68764e78..433bdf661c23d490a3111f41545c7559224f2848 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,9 +25,29 @@ RUN add-apt-repository -y ppa:ondrej/php && \ add-apt-repository -y ppa:ondrej/php5-compat && \ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C && \ apt-get update && \ - apt-get -y dist-upgrade && \ - apt-get -y install supervisor wget curl git zip unzip pwgen apache2 mysql-server-5.7 php5.6 libapache2-mod-php5.6 php5.6-mysql php5.6-mcrypt php5.6-gd php5.6-xml php5.6-mbstring php5.6-gettext php5.6-zip php5.6-curl && \ - apt-get -y autoremove + apt-get -y upgrade && \ + apt-get -y --no-install-recommends install \ + supervisor \ + wget \ + curl \ + git \ + zip \ + unzip \ + pwgen \ + apache2 \ + mysql-server-5.7 \ + php5.6 \ + libapache2-mod-php5.6 \ + php5.6-mysql \ + php5.6-mcrypt \ + php5.6-gd \ + php5.6-xml \ + php5.6-mbstring \ + php5.6-gettext \ + php5.6-zip \ + php5.6-curl && \ + apt-get -y autoremove && \ + rm -rf /var/lib/apt/lists/* # Point CLI to use PHP 5.6 RUN ln -sfn /usr/bin/php5.6 /etc/alternatives/php @@ -39,7 +59,7 @@ ADD config/create_mysql_users.sh /create_mysql_users.sh ADD config/run.sh /run.sh RUN chmod 755 /*.sh -# Add better default configurations +# Add sensible default configurations ADD config/supervisord-apache2.conf /etc/supervisor/conf.d/supervisord-apache2.conf ADD config/supervisord-mysqld.conf /etc/supervisor/conf.d/supervisord-mysqld.conf ADD config/mysqld_innodb.cnf /etc/mysql/conf.d/mysqld_innodb.cnf @@ -69,9 +89,6 @@ RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && php -r "unlink('composer-setup.php');" && \ mv composer.phar /usr/local/bin/composer -# Set "secure" MySQL admin password -ENV MYSQL_PASS:-$(pwgen -s 12 1) - # Enable mod_rewrite RUN a2enmod rewrite diff --git a/app/index.php b/app/index.php index febe05f57c720372d6aa360f37da8680504e86de..43e34580a57644c7d5014ac4d56ff6a7435cee1c 100644 --- a/app/index.php +++ b/app/index.php @@ -5,26 +5,19 @@ $db = new PDO('mysql:host=localhost', 'root', null); - Hello World from Docker-LAMP - + Hello World from PHP 5 on Docker