Skip to content

Commit

Permalink
Merge pull request #11 from mvandrew/develop
Browse files Browse the repository at this point in the history
Установка акселератора opcache в образы php 7.2 и 7.4
  • Loading branch information
mvandrew authored Nov 2, 2021
2 parents 542c836 + 853701b commit fbf3553
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
7 changes: 4 additions & 3 deletions images/php-7.2-apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ RUN apt-get update && \
libonig-dev \
wget \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) bz2 bcmath calendar gd pdo pdo_mysql iconv mbstring intl tidy xmlrpc mysqli xsl sockets xml soap \
&& docker-php-ext-configure opcache --enable-opcache \
&& docker-php-ext-install -j$(nproc) bz2 bcmath calendar gd pdo pdo_mysql iconv mbstring intl tidy xmlrpc mysqli xsl sockets xml soap opcache \
&& pecl channel-update pecl.php.net \
&& pecl install mcrypt memcache memcached apcu imagick zip redis oauth \
&& docker-php-ext-enable mcrypt memcached apcu imagick zip redis oauth \
&& pecl install mcrypt memcache memcached imagick zip redis oauth \
&& docker-php-ext-enable mcrypt memcached imagick zip redis oauth opcache \
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*

RUN make-ssl-cert generate-default-snakeoil
Expand Down
4 changes: 3 additions & 1 deletion images/php-7.2-apache/conf/php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ pcre.recursion_limit = 14000
realpath_cache_size = 4096k

[opcache]
opcache.revalidate_freq = 0
opcache.enable = 1
opcache.enable_cli = 1
opcache.revalidate_freq = 60
opcache.validate_timestamps = 1
opcache.max_accelerated_files = 100000
opcache.memory_consumption = 512
Expand Down
7 changes: 4 additions & 3 deletions images/php-apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ RUN apt-get update && \
libonig-dev \
wget \
&& docker-php-ext-configure gd --with-webp --with-jpeg --with-xpm --with-freetype \
&& docker-php-ext-install -j$(nproc) mysqli bz2 bcmath calendar gd pdo pdo_mysql iconv mbstring intl tidy xmlrpc xsl sockets xml soap \
&& docker-php-ext-configure opcache --enable-opcache \
&& docker-php-ext-install -j$(nproc) mysqli bz2 bcmath calendar gd pdo pdo_mysql iconv mbstring intl tidy xmlrpc xsl sockets xml soap opcache \
&& pecl channel-update pecl.php.net \
&& pecl install mcrypt memcache memcached apcu imagick zip redis oauth \
&& docker-php-ext-enable mysqli mcrypt memcached apcu imagick zip redis oauth \
&& pecl install mcrypt memcache memcached imagick zip redis oauth \
&& docker-php-ext-enable mysqli mcrypt memcached imagick zip redis oauth opcache \
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*

RUN make-ssl-cert generate-default-snakeoil
Expand Down
4 changes: 3 additions & 1 deletion images/php-apache/conf/php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ pcre.recursion_limit = 14000
realpath_cache_size = 4096k

[opcache]
opcache.revalidate_freq = 0
opcache.enable = 1
opcache.enable_cli = 1
opcache.revalidate_freq = 60
opcache.validate_timestamps = 1
opcache.max_accelerated_files = 100000
opcache.memory_consumption = 512
Expand Down

0 comments on commit fbf3553

Please sign in to comment.