-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
FROM php:7-fpm | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
libfreetype6-dev \ | ||
libjpeg62-turbo-dev \ | ||
libpng-dev \ | ||
libpq-dev \ | ||
g++ \ | ||
libicu-dev \ | ||
libxml2-dev \ | ||
git \ | ||
vim \ | ||
libfreetype6-dev \ | ||
libjpeg62-turbo-dev \ | ||
libmcrypt-dev \ | ||
zlib1g-dev \ | ||
libmagickwand-dev --no-install-recommends | ||
|
||
RUN docker-php-ext-configure intl \ | ||
&& docker-php-ext-install mbstring \ | ||
&& docker-php-ext-install intl \ | ||
&& docker-php-ext-install zip \ | ||
&& docker-php-ext-install pdo_mysql \ | ||
&& docker-php-ext-install pdo_pgsql \ | ||
&& docker-php-ext-install soap \ | ||
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ | ||
&& docker-php-ext-install -j$(nproc) gd \ | ||
&& docker-php-ext-install opcache \ | ||
&& docker-php-ext-install mysqli \ | ||
&& pecl install imagick \ | ||
&& docker-php-ext-enable imagick \ | ||
&& pecl install apcu \ | ||
&& docker-php-ext-enable apcu | ||
|
||
ENV PHPREDIS_VERSION 3.1.4 | ||
|
||
RUN curl -L -o /tmp/redis.tar.gz https://github.com/phpredis/phpredis/archive/$PHPREDIS_VERSION.tar.gz \ | ||
&& mkdir /tmp/redis \ | ||
&& tar -xf /tmp/redis.tar.gz -C /tmp/redis \ | ||
&& rm /tmp/redis.tar.gz \ | ||
&& ( \ | ||
cd /tmp/redis/phpredis-$PHPREDIS_VERSION \ | ||
&& phpize \ | ||
&& ./configure \ | ||
&& make -j$(nproc) \ | ||
&& make install \ | ||
) \ | ||
&& rm -r /tmp/redis \ | ||
&& docker-php-ext-enable redis | ||
|
||
RUN sed -i -e 's/listen.*/listen = 0.0.0.0:9000/' /usr/local/etc/php-fpm.conf | ||
|
||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | ||
|
||
RUN usermod -u 1000 www-data | ||
|
||
COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini | ||
|
||
CMD ["php-fpm"] |