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