Last active
August 1, 2018 17:58
-
-
Save mikoj/b7c7571b5ed2c18eb958af82e03f86da to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:fpm | |
# install the PHP extensions we need | |
RUN apt-get update && apt-get install -y libfreetype6-dev libpng-dev libjpeg62-turbo-dev libmemcached-dev zlib1g-dev && rm -rf /var/lib/apt/lists/* \ | |
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-png-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ | |
&& docker-php-ext-install -j$(nproc) gd mysqli opcache pdo_mysql \ | |
&& pecl install memcached-3.0.4 \ | |
&& docker-php-ext-enable memcached | |
# set recommended PHP.ini settings | |
# see https://secure.php.net/manual/en/opcache.installation.php | |
RUN { \ | |
echo 'opcache.memory_consumption=128'; \ | |
echo 'opcache.interned_strings_buffer=8'; \ | |
echo 'opcache.max_accelerated_files=4000'; \ | |
echo 'opcache.revalidate_freq=2'; \ | |
echo 'opcache.fast_shutdown=1'; \ | |
echo 'opcache.enable_cli=1'; \ | |
} > /usr/local/etc/php/conf.d/opcache-recommended.ini |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment