Skip to content

Instantly share code, notes, and snippets.

@tinker1987
Created February 21, 2018 10:20
Show Gist options
  • Save tinker1987/d5e9427b7888be5d3e0d64f345370d42 to your computer and use it in GitHub Desktop.
Save tinker1987/d5e9427b7888be5d3e0d64f345370d42 to your computer and use it in GitHub Desktop.
PHP 7.0 with preinstalled packages: intl, mcrypt, iconv, curl, mbstring, bcmath, bz2, mysqli, pdo, pdo_mysql, zip, xml, json, xsl, gd, redis, xdebug, memcached, geoip and composer
FROM php:7.0-fpm-alpine
# =================================================================================================
# Install packages
RUN apk update
RUN apk add --no-cache git supervisor curl curl-dev autoconf libjpeg-turbo-dev freetype-dev libpng-dev libmcrypt-dev libcurl libbz2 bzip2-dev geoip openssl-dev icu icu-dev icu-libs zlib-dev memcached libmemcached-dev alpine-sdk build-base gcc wget cyrus-sasl-dev geoip-dev libxslt-dev libxml2-dev
RUN docker-php-ext-configure intl && docker-php-ext-install intl
RUN docker-php-ext-install mcrypt iconv curl mbstring bcmath bz2 mysqli pdo pdo_mysql zip xml json xsl
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd
RUN pecl channel-update pecl.php.net
RUN pecl install redis \
&& pecl install xdebug \
&& pecl install memcached \
&& pecl install geoip-1.1.1 \
&& docker-php-ext-enable redis memcached xdebug geoip
RUN curl -sS https://getcomposer.org/installer | php && mv ./composer.phar /usr/local/bin/composer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment