Skip to content

Instantly share code, notes, and snippets.

@iggyster
Created December 16, 2019 17:14
Show Gist options
  • Save iggyster/ae759942d86884e1259e0c0ebb3c1646 to your computer and use it in GitHub Desktop.
Save iggyster/ae759942d86884e1259e0c0ebb3c1646 to your computer and use it in GitHub Desktop.
Dockerfile example for php image
FROM php:7.2-fpm
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
libmemcached-dev \
libz-dev \
libpq-dev \
libjpeg-dev \
libpng-dev \
libfreetype6-dev \
libssl-dev \
libmcrypt-dev \
apt-utils \
libzip-dev zip unzip && \
docker-php-ext-configure zip --with-libzip && \
docker-php-ext-install zip && \
php -m | grep -q 'zip' \
&& rm -rf /var/lib/apt/lists/*
RUN curl --insecure https://getcomposer.org/composer.phar -o /usr/bin/composer && \
chmod +x /usr/bin/composer
RUN composer global require hirak/prestissimo
RUN docker-php-ext-configure gd --with-jpeg-dir=/usr/lib --with-freetype-dir=/usr/include/freetype2 && \
docker-php-ext-install gd pcntl bcmath pdo pdo_mysql
RUN pecl install xdebug-2.7.0 && docker-php-ext-enable xdebug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment