Skip to content

Instantly share code, notes, and snippets.

@rzani
Created February 7, 2017 14:58
Show Gist options
  • Select an option

  • Save rzani/23f7b82cfe68c99aa40285ff889c598d to your computer and use it in GitHub Desktop.

Select an option

Save rzani/23f7b82cfe68c99aa40285ff889c598d to your computer and use it in GitHub Desktop.

Revisions

  1. rzani created this gist Feb 7, 2017.
    22 changes: 22 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    FROM php:5.6.22-fpm

    # Installing Composer
    RUN curl -sS https://getcomposer.org/installer | php && mv ./composer.phar /usr/local/bin/composer

    RUN apt-get update && apt-get install -y \
    zip \
    unzip \
    curl \
    git-core \
    libxml2-dev \
    libcurl4-gnutls-dev \
    libfreetype6-dev \
    libjpeg62-turbo-dev \
    libmcrypt-dev \
    libpng12-dev \
    libmemcached-dev \
    && pecl install memcached \
    && docker-php-ext-install -j$(nproc) iconv mcrypt gd pdo pdo_mysql dom hash curl \
    && docker-php-ext-enable memcached

    RUN usermod -u 1000 -g 50 www-data
    25 changes: 25 additions & 0 deletions Dockerfile - xdebug
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    FROM php:5.6.22-fpm

    # Installing Composer
    RUN curl -sS https://getcomposer.org/installer | php && mv ./composer.phar /usr/local/bin/composer

    RUN apt-get update && apt-get install -y \
    zip \
    unzip \
    curl \
    git-core \
    libxml2-dev \
    libcurl4-gnutls-dev \
    libfreetype6-dev \
    libjpeg62-turbo-dev \
    libmcrypt-dev \
    libpng12-dev \
    libmemcached-dev \
    && pecl install memcached 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 \
    && docker-php-ext-install -j$(nproc) iconv mcrypt gd pdo pdo_mysql dom hash curl \
    && docker-php-ext-enable memcached

    RUN usermod -u 1000 -g 50 www-data