From e19254491f61e812dd2d2f3c0a65115548f47aad Mon Sep 17 00:00:00 2001 From: metakin Date: Fri, 10 Feb 2023 06:52:26 +0300 Subject: [PATCH 1/5] Upgrade PHP from 7.0 to 7.4 --- Dockerfile | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index ed1b361..949da4d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,17 @@ -FROM php:7.0-apache +FROM php:7.4-apache MAINTAINER Webgriffe Srl # Install GD RUN apt-get update \ - && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev \ - && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ + && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng16-16 \ + && docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ \ && docker-php-ext-install gd # Install MCrypt RUN apt-get update \ && apt-get install -y libmcrypt-dev \ - && docker-php-ext-install mcrypt + && pecl install mcrypt-1.0.3 \ + && docker-php-ext-enable mcrypt # Install Intl RUN apt-get update \ @@ -19,7 +20,7 @@ RUN apt-get update \ ENV XDEBUG_ENABLE 0 RUN pecl config-set preferred_state beta \ - && pecl install -o -f xdebug \ + && pecl install -o -f xdebug-3.0.0 \ && rm -rf /tmp/pear \ && pecl config-set preferred_state stable COPY ./99-xdebug.ini.disabled /usr/local/etc/php/conf.d/ @@ -31,6 +32,10 @@ RUN docker-php-ext-install mysqli pdo_mysql RUN curl -sS https://getcomposer.org/installer | php \ && mv composer.phar /usr/local/bin/composer +# Install Oniguruma +RUN apt-get update \ + && apt-get install -y libonig-dev + # Install mbstring RUN docker-php-ext-install mbstring @@ -43,7 +48,9 @@ RUN apt-get update \ RUN docker-php-ext-install opcache # Install PHP zip extension -RUN docker-php-ext-install zip +RUN apt-get update \ + && apt-get install -y libzip-dev \ + && docker-php-ext-install zip # Install Git RUN apt-get update \ @@ -77,7 +84,7 @@ RUN apt-get update \ # Install MySQL CLI Client RUN apt-get update \ - && apt-get install -y mysql-client + && apt-get install -y default-mysql-client ######################################################################################################################## From 93738a65482a26592c11c9b73d73ef720a4583a8 Mon Sep 17 00:00:00 2001 From: metakin Date: Fri, 10 Feb 2023 06:52:55 +0300 Subject: [PATCH 2/5] Update php.ini --- 999-php.ini | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/999-php.ini b/999-php.ini index 7b69ed7..7236ae9 100644 --- a/999-php.ini +++ b/999-php.ini @@ -1,2 +1,6 @@ memory_limit = -1 error_reporting = E_ALL | E_STRICT +max_execution_time = 0 +max_input_time = 0 +post_max_size = 100M +upload_max_filesize = 100M \ No newline at end of file From 3a70f08440870f55062d0b1fa8af42577cbd7248 Mon Sep 17 00:00:00 2001 From: metakin Date: Sun, 12 Feb 2023 03:02:34 +0300 Subject: [PATCH 3/5] Upgrade PHP from 7.4 to 8.0 --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 949da4d..e2f4b6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.4-apache +FROM php:8.0-apache MAINTAINER Webgriffe Srl # Install GD @@ -10,7 +10,7 @@ RUN apt-get update \ # Install MCrypt RUN apt-get update \ && apt-get install -y libmcrypt-dev \ - && pecl install mcrypt-1.0.3 \ + && pecl install mcrypt-1.0.4 \ && docker-php-ext-enable mcrypt # Install Intl @@ -67,6 +67,9 @@ ENV PHP_TIMEZONE Europe/Rome # Configure Apache Document Root ENV APACHE_DOC_ROOT /var/www/html +# Configure Apache ServerName +ENV APACHE_SERVER_NAME localhost + # Enable Apache mod_rewrite RUN a2enmod rewrite From 516fb1f6d60122317a21310b32659372776dad4b Mon Sep 17 00:00:00 2001 From: metakin Date: Sun, 12 Feb 2023 03:03:47 +0300 Subject: [PATCH 4/5] Adds php-imap ext --- Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index e2f4b6d..482f087 100644 --- a/Dockerfile +++ b/Dockerfile @@ -85,6 +85,12 @@ RUN apt-get update \ && echo "FromLineOverride=YES" >> /etc/ssmtp/ssmtp.conf \ && echo 'sendmail_path = "/usr/sbin/ssmtp -t"' > /usr/local/etc/php/conf.d/mail.ini +# Install imap +RUN apt-get update \ + && apt-get install -y libc-client-dev libkrb5-dev \ + && docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ + && docker-php-ext-install imap + # Install MySQL CLI Client RUN apt-get update \ && apt-get install -y default-mysql-client From adc12b5732df461fd24e1f202cd0ebf7efaf5697 Mon Sep 17 00:00:00 2001 From: metakin Date: Sun, 12 Feb 2023 03:04:29 +0300 Subject: [PATCH 5/5] Adds ServerName Directive --- start | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/start b/start index c4e7a29..8766238 100755 --- a/start +++ b/start @@ -15,6 +15,11 @@ echo " Require all granted" >> /etc/apache2/conf-available/document-root-directo echo "" >> /etc/apache2/conf-available/document-root-directory.conf a2enconf "document-root-directory.conf" +# Set ServerName Directive +echo "ServerName $APACHE_SERVER_NAME" > /etc/apache2/conf-available/server-name.conf +a2enconf "server-name.conf" + + # Enable XDebug if needed if [ "$XDEBUG_ENABLE" = "1" ]; then docker-php-ext-enable xdebug