FROM php:7.2-fpm-alpine RUN apk add --no-cache --virtual .persistent-deps \ git \ icu-libs \ zlib ENV APCU_VERSION 5.1.11 RUN set -xe \ && apk add --no-cache --virtual .build-deps \ $PHPIZE_DEPS \ icu-dev \ zlib-dev \ && docker-php-ext-install \ intl \ zip \ && pecl install \ apcu-${APCU_VERSION} \ && docker-php-ext-enable --ini-name 20-apcu.ini apcu \ && docker-php-ext-enable --ini-name 05-opcache.ini opcache \ && apk del .build-deps RUN docker-php-ext-install pdo pdo_mysql COPY docker/server/php.ini /usr/local/etc/php/php.ini COPY --from=composer:1.6 /usr/bin/composer /usr/bin/composer COPY docker/server/docker-entrypoint.sh /usr/local/bin/docker-app-entrypoint RUN chmod +x /usr/local/bin/docker-app-entrypoint WORKDIR /srv/server ENTRYPOINT ["docker-app-entrypoint"] CMD ["php-fpm"] # https://getcomposer.org/doc/03-cli.md#composer-allow-superuser ENV COMPOSER_ALLOW_SUPERUSER 1 # Use prestissimo to speed up builds RUN composer global require "hirak/prestissimo:^0.3" --prefer-dist --no-progress --no-suggest --optimize-autoloader --classmap-authoritative --no-interaction ###> recipes ### ###< recipes ### COPY ./server . RUN composer install