Update composer to 1.8, php to 7.3, add opcache
This commit is contained in:
parent
fc6d6e3887
commit
9981f1f9df
2 changed files with 26 additions and 10 deletions
27
Dockerfile
27
Dockerfile
|
|
@ -1,20 +1,27 @@
|
|||
FROM composer:1.7 as composer
|
||||
FROM composer:1.8 as composer
|
||||
|
||||
FROM php:7.2-fpm-alpine3.8
|
||||
|
||||
WORKDIR /app
|
||||
FROM php:7.3-fpm-alpine3.9
|
||||
|
||||
COPY --from=composer /usr/bin/composer /usr/bin/composer
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add --no-cache bash icu icu-dev libxml2-dev nodejs-current nodejs-npm
|
||||
|
||||
RUN apk add --no-cache --virtual .node-build-deps \
|
||||
g++ \
|
||||
make \
|
||||
python
|
||||
|
||||
RUN docker-php-ext-configure intl \
|
||||
&& docker-php-ext-install -j$(nproc) intl pdo_mysql zip
|
||||
g++ \
|
||||
make \
|
||||
python \
|
||||
&& docker-php-ext-configure intl \
|
||||
&& docker-php-ext-install -j$(nproc) intl opcache pdo_mysql \
|
||||
&& apk del .node-build-deps
|
||||
|
||||
RUN npm install -g yarn
|
||||
|
||||
ENV PATH="/app:/app/vendor/bin:${PATH}"
|
||||
|
||||
COPY conf.d/opcache.ini /usr/local/etc/php/conf.d/opcache.ini
|
||||
# sane defaults for opcache
|
||||
ENV PHP_OPCACHE_VALIDATE_TIMESTAMPS="0"
|
||||
ENV PHP_OPCACHE_MAX_ACCELERATED_FILES="10000"
|
||||
ENV PHP_OPCACHE_MEMORY_CONSUMPTION="192"
|
||||
|
|
|
|||
9
conf.d/opcache.ini
Normal file
9
conf.d/opcache.ini
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[opcache]
|
||||
opcache.enable=1
|
||||
opcache.revalidate_freq=0
|
||||
opcache.validate_timestamps=${PHP_OPCACHE_VALIDATE_TIMESTAMPS}
|
||||
opcache.max_accelerated_files=${PHP_OPCACHE_MAX_ACCELERATED_FILES}
|
||||
opcache.memory_consumption=${PHP_OPCACHE_MEMORY_CONSUMPTION}
|
||||
opcache.max_wasted_percentage=10
|
||||
opcache.interned_strings_buffer=16
|
||||
opcache.fast_shutdown=1
|
||||
Loading…
Add table
Add a link
Reference in a new issue