Skip to content

Instantly share code, notes, and snippets.

@kevtainer
Created October 1, 2015 14:59
Show Gist options
  • Save kevtainer/11635dccb5f84a64bba0 to your computer and use it in GitHub Desktop.
Save kevtainer/11635dccb5f84a64bba0 to your computer and use it in GitHub Desktop.
FROM php:5.6-fpm
# compile + install xdebug
RUN curl -SL "http://xdebug.org/files/xdebug-2.3.3.tgz" -o xdebug.tar.xz \
&& mkdir -p /usr/src/xdebug \
&& tar -xof xdebug.tar.xz -C /usr/src/xdebug --strip-components=1 \
&& rm xdebug.tar.xz \
&& cd /usr/src/xdebug \
&& phpize \
&& ./configure \
&& make -j"$(nproc)" \
&& cp modules/xdebug.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226
# Install modules
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
&& docker-php-ext-install iconv mcrypt mbstring pdo \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd
# RUN echo "php_flag[display_errors] = on" >> /usr/local/etc/php-fpm.conf \
# && echo "php_admin_value[log_errors] = on" >> /usr/local/etc/php-fpm.conf \
# && echo "zend_extension=xdebug.so" > /usr/local/etc/php/conf.d/xdebug.ini
CMD ["php-fpm"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment