File tree 2 files changed +24
-4
lines changed
2 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,18 @@ RUN a2enmod rewrite
5
5
# install the PHP extensions we need
6
6
RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev && rm -rf /var/lib/apt/lists/* \
7
7
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
8
- && docker-php-ext-install gd
9
- RUN docker-php-ext-install mysqli
8
+ && docker-php-ext-install gd mysqli opcache
9
+
10
+ # set recommended PHP.ini settings
11
+ # see https://secure.php.net/manual/en/opcache.installation.php
12
+ RUN { \
13
+ echo 'opcache.memory_consumption=128' ; \
14
+ echo 'opcache.interned_strings_buffer=8' ; \
15
+ echo 'opcache.max_accelerated_files=4000' ; \
16
+ echo 'opcache.revalidate_freq=60' ; \
17
+ echo 'opcache.fast_shutdown=1' ; \
18
+ echo 'opcache.enable_cli=1' ; \
19
+ } > /usr/local/etc/php/conf.d/opcache-recommended.ini
10
20
11
21
VOLUME /var/www/html
12
22
Original file line number Diff line number Diff line change @@ -3,8 +3,18 @@ FROM php:5.6-fpm
3
3
# install the PHP extensions we need
4
4
RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev && rm -rf /var/lib/apt/lists/* \
5
5
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
6
- && docker-php-ext-install gd
7
- RUN docker-php-ext-install mysqli
6
+ && docker-php-ext-install gd mysqli opcache
7
+
8
+ # set recommended PHP.ini settings
9
+ # see https://secure.php.net/manual/en/opcache.installation.php
10
+ RUN { \
11
+ echo 'opcache.memory_consumption=128' ; \
12
+ echo 'opcache.interned_strings_buffer=8' ; \
13
+ echo 'opcache.max_accelerated_files=4000' ; \
14
+ echo 'opcache.revalidate_freq=60' ; \
15
+ echo 'opcache.fast_shutdown=1' ; \
16
+ echo 'opcache.enable_cli=1' ; \
17
+ } > /usr/local/etc/php/conf.d/opcache-recommended.ini
8
18
9
19
VOLUME /var/www/html
10
20
You can’t perform that action at this time.
0 commit comments