Last active
July 23, 2017 15:11
-
-
Save max-m/73eb4a136f6e152cc1677bedb728f985 to your computer and use it in GitHub Desktop.
PHP
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
FROM php:fpm | |
MAINTAINER Maximilian Mader | |
# Install native extensions | |
RUN buildDeps=" \ | |
locales \ | |
libmcrypt-dev \ | |
libpng12-dev \ | |
libfreetype6-dev \ | |
libjpeg62-turbo-dev \ | |
libicu-dev \ | |
libmagickwand-dev \ | |
g++ \ | |
"; \ | |
set -x \ | |
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends \ | |
&& echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \ | |
&& echo "de_DE.UTF-8 UTF-8" >> /etc/locale.gen \ | |
&& locale-gen | |
RUN docker-php-ext-install sockets \ | |
&& docker-php-ext-install mcrypt \ | |
&& docker-php-ext-install pdo_mysql mysqli \ | |
&& docker-php-ext-install mbstring \ | |
&& docker-php-ext-configure gd --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include/ --with-gd-dir=/usr/include/ \ | |
&& docker-php-ext-install gd \ | |
&& docker-php-ext-install intl \ | |
&& docker-php-ext-install exif | |
# Install PEAR modules | |
RUN pear install Auth_SASL \ | |
&& pear install Net_SMTP \ | |
&& pear install Net_IDNA2-beta \ | |
&& pear install Mail_mime \ | |
&& pear install Mail_mimeDecode | |
# PECL | |
RUN pecl install imagick-3.4.3RC4 \ | |
&& pecl install -o -f redis \ | |
&& rm -rf /tmp/pear \ | |
&& docker-php-ext-enable imagick \ | |
&& docker-php-ext-enable redis | |
# Cleanup | |
RUN apt-get purge -y --auto-remove g++ \ | |
&& apt-get clean \ | |
&& rm -rf /var/lib/apt/lists/* | |
COPY php.ini /usr/local/etc/php/ | |
CMD ["php-fpm"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment