From 020af665656b83950c10bd5be7a8ae3a5172c9b4 Mon Sep 17 00:00:00 2001 From: D4rkHeart <leonardo.surdez@gmail.com> Date: Tue, 12 Sep 2023 13:57:19 +0200 Subject: [PATCH] [Feat] Dockerfile-api set-up - Update deprecated terms - Update apache-php image from 7.3 to 8.2 - Fix Apache request header limit --- Docker/Dockerfile-api.dockerfile | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/Docker/Dockerfile-api.dockerfile b/Docker/Dockerfile-api.dockerfile index b782001..17f4b57 100644 --- a/Docker/Dockerfile-api.dockerfile +++ b/Docker/Dockerfile-api.dockerfile @@ -1,5 +1,4 @@ -#FROM php:7.3-stretch -FROM php:7.3-apache +FROM php:8.2-apache RUN apt-get update; apt-get install -yq git vim zip; RUN curl -sS https://getcomposer.org/installer | php @@ -11,6 +10,7 @@ RUN a2enmod rewrite ENV APACHE_DOCUMENT_ROOT /var/www/html/public RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf +RUN echo "LimitRequestFieldSize 81920" > /etc/apache2/conf-enabled/say-yes-to-bearer-tokens.conf RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf # XDEBUG @@ -19,13 +19,9 @@ RUN docker-php-ext-enable xdebug # Enable Remote xdebug RUN echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/xdebug.ini -RUN echo "xdebug.default_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini -RUN echo "xdebug.client_port=9000" >> /usr/local/etc/php/conf.d/xdebug.ini -RUN echo "xdebug.discover_client_host=on" >> /usr/local/etc/php/conf.d/xdebug.ini - - -# RUN chmod 777 -R /var/www/html/storage - -# RUN apt-get install nodejs -y; apt-get install npm -y; -# RUN useradd -u 1000 containerUser -# RUN usermod -a -G root containerUser \ No newline at end of file +RUN echo "xdebug.log=/proc/self/fd/1" >> /usr/local/etc/php/conf.d/xdebug.ini +RUN echo "xdebug.start_with_request=yes" >> /usr/local/etc/php/conf.d/xdebug.ini +RUN echo "xdebug.client_port=9003" >> /usr/local/etc/php/conf.d/xdebug.ini +# https://github.com/docker/for-win/issues/12673 says host.docker.internal does not work (and we cannot trust the guessing mechanism, because +# we are going through Traefik): +RUN echo "xdebug.client_host=172.22.0.1" >> /usr/local/etc/php/conf.d/xdebug.ini \ No newline at end of file -- GitLab