3 # Install additional dependencies
4 RUN apt-get update && \
15 rm -rf /var/lib/apt/lists/*
17 # Install PHP extensions
18 RUN docker-php-ext-configure ldap --with-libdir="lib/$(gcc -dumpmachine)" && \
19 docker-php-ext-configure gd --with-freetype --with-jpeg && \
20 docker-php-ext-install -j$(nproc) pdo_mysql gd ldap zip && \
21 pecl install xdebug && \
22 docker-php-ext-enable xdebug
25 RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
28 RUN a2enmod rewrite && \
29 sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf && \
30 sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
32 # Use the default production configuration and update it as required
33 RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" && \
34 sed -i 's/memory_limit = 128M/memory_limit = 512M/g' "$PHP_INI_DIR/php.ini"
36 ENV APACHE_DOCUMENT_ROOT="/app/public"