Skip to content

Instantly share code, notes, and snippets.

@tijsverkoyen
Created May 22, 2017 06:21
Show Gist options
  • Save tijsverkoyen/fa096eb123f2b85ca140e25ccc2e98ff to your computer and use it in GitHub Desktop.
Save tijsverkoyen/fa096eb123f2b85ca140e25ccc2e98ff to your computer and use it in GitHub Desktop.
FROM php:7.1-apache
MAINTAINER Tijs Verkoyen <[email protected]>
# Install unzip
RUN apt-get update && apt-get install -y \
unzip
# Install git
RUN apt-get update && apt-get install -y \
git
# Enable mod-rewrite
RUN a2enmod rewrite
# Install pdo_mysql
RUN docker-php-ext-install pdo_mysql
# Install intl
RUN apt-get update && apt-get install -y \
g++ \
libicu-dev \
zlib1g-dev \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl
# Install GD2
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng12-dev \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd
# Install zip
RUN docker-php-ext-install zip
# Install XDebug
RUN pecl install xdebug-2.5.0 \
&& docker-php-ext-enable xdebug
# Install SOAP
RUN apt-get update && apt-get install -y \
libxml2-dev \
&& docker-php-ext-install soap
# Copy our fixes.ini
COPY fixes.ini /usr/local/etc/php/conf.d/fixes.ini
# Install composer and make the correct dirs writable
ENV PATH "/composer/vendor/bin:$PATH"
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV COMPOSER_HOME /composer
RUN curl -s -f -L -o /tmp/installer.php https://getcomposer.org/installer \
&& php /tmp/installer.php --no-ansi --install-dir=/usr/bin --filename=composer \
&& rm /tmp/installer.php \
&& mkdir -p /composer \
&& chmod -R 777 /composer
# Install MySQL-client
RUN apt-get update && apt-get install -y \
mysql-client
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment