Skip to content

Instantly share code, notes, and snippets.

@pashamray
Created September 11, 2018 05:39
Show Gist options
  • Save pashamray/8b9b4ea7efbe008e0824524c9c024a78 to your computer and use it in GitHub Desktop.
Save pashamray/8b9b4ea7efbe008e0824524c9c024a78 to your computer and use it in GitHub Desktop.
Docker PHP FPM 7.1.3
FROM php:7.1.3-fpm
RUN apt-get update && apt-get install -y git zip unzip libz-dev zlib1g-dev libc-client-dev libkrb5-dev libicu-dev g++ libmcrypt-dev \
mysql-client libmagickwand-dev --no-install-recommends \
&& pecl install imagick \
&& docker-php-ext-enable imagick \
&& docker-php-ext-install mcrypt pdo_mysql \
&& docker-php-ext-install mbstring \
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
&& docker-php-ext-install imap \
&& docker-php-ext-configure zip \
&& docker-php-ext-install zip \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl
RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.idekey=PHPSTORM" >> /usr/local/etc/php/conf.d/xdebug.ini
#RUN echo "date.timezone=Europe/Kiev" > /usr/local/etc/php/conf.d/timezone.ini
RUN usermod -u 1000 www-data
WORKDIR /var/www
CMD ["php-fpm"]
EXPOSE 9000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment