@@ -30,14 +30,17 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y \
3030 cron \
3131 libzip-dev \
3232 && docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd \
33+ && docker-php-ext-configure intl \
3334 && docker-php-ext-install \
3435 pdo_mysql \
36+ sockets \
3537 intl \
36- zip && \
37- rm -fr /tmp/* && \
38- rm -rf /var/list/apt/* && \
39- rm -r /var/lib/apt/lists/* && \
40- apt-get clean
38+ opcache \
39+ zip \
40+ && rm -rf /tmp/* \
41+ && rm -rf /var/list/apt/* \
42+ && rm -rf /var/lib/apt/lists/* \
43+ && apt-get clean
4144
4245# disable default site and delete all default files inside APP_HOME
4346RUN a2dissite 000-default.conf
@@ -66,7 +69,9 @@ COPY ./docker/dev/xdebug.ini /tmp/
6669RUN chmod u+x /tmp/do_we_need_xdebug.sh && /tmp/do_we_need_xdebug.sh
6770
6871# install composer
69- RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer
72+ COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
73+ RUN chmod +x /usr/bin/composer
74+ ENV COMPOSER_ALLOW_SUPERUSER 1
7075
7176# add supervisor
7277RUN mkdir -p /var/log/supervisor
@@ -91,8 +96,8 @@ COPY --chown=www-data:www-data . $APP_HOME/
9196COPY --chown=www-data:www-data .env.$ENV $APP_HOME/.env
9297
9398# install all PHP dependencies
94- RUN if [ "$BUILD_ARGUMENT_ENV" = "dev" ] || [ "$BUILD_ARGUMENT_ENV" = "test" ]; then composer install --no-interaction --no-progress; \
95- else composer install --no-interaction --no-progress --no-dev; \
99+ RUN if [ "$BUILD_ARGUMENT_ENV" = "dev" ] || [ "$BUILD_ARGUMENT_ENV" = "test" ]; then COMPOSER_MEMORY_LIMIT=-1 composer install --optimize-autoloader --no-interaction --no-progress; \
100+ else COMPOSER_MEMORY_LIMIT=-1 composer install --optimize-autoloader --no-interaction --no-progress --no-dev; \
96101 fi
97102
98103USER root
0 commit comments