2022-02-04 14:26:39 +01:00
|
|
|
FROM php:8.1-apache
|
2019-06-23 13:16:45 +02:00
|
|
|
|
|
|
|
ENV APACHE_DOCUMENT_ROOT /app/public
|
|
|
|
WORKDIR /app
|
|
|
|
|
2021-03-21 18:42:10 +01:00
|
|
|
# Install additional dependacnies and configure apache
|
2019-06-23 13:16:45 +02:00
|
|
|
RUN apt-get update -y \
|
2021-06-22 20:12:24 +02:00
|
|
|
&& apt-get install -y git zip unzip libpng-dev libldap2-dev libzip-dev wait-for-it \
|
2019-08-26 23:01:10 +02:00
|
|
|
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu \
|
2021-06-22 20:12:24 +02:00
|
|
|
&& docker-php-ext-install pdo_mysql gd ldap zip \
|
2022-01-22 17:37:06 +01:00
|
|
|
&& pecl install xdebug \
|
|
|
|
&& docker-php-ext-enable xdebug \
|
2019-06-23 13:16:45 +02:00
|
|
|
&& a2enmod rewrite \
|
|
|
|
&& sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \
|
2021-03-21 18:42:10 +01:00
|
|
|
&& sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
|
|
|
|
|
|
|
|
# Install composer
|
|
|
|
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
|
2019-06-23 13:16:45 +02:00
|
|
|
&& php composer-setup.php \
|
|
|
|
&& mv composer.phar /usr/bin/composer \
|
|
|
|
&& php -r "unlink('composer-setup.php');"
|
2021-03-21 18:42:10 +01:00
|
|
|
|
|
|
|
# Use the default production configuration and update it as required
|
|
|
|
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \
|
2021-06-22 20:12:24 +02:00
|
|
|
&& sed -i 's/memory_limit = 128M/memory_limit = 512M/g' "$PHP_INI_DIR/php.ini"
|