2019-02-02 12:53:34 +03:00
|
|
|
FROM php:7.3.1-fpm-alpine3.8
|
2017-01-20 00:56:45 +03:00
|
|
|
MAINTAINER Alejandro Celaya <alejandro@alejandrocelaya.com>
|
|
|
|
|
2019-02-02 12:53:34 +03:00
|
|
|
ENV APCU_VERSION 5.1.16
|
|
|
|
ENV APCU_BC_VERSION 1.0.4
|
|
|
|
ENV XDEBUG_VERSION "2.7.0RC1"
|
|
|
|
|
2017-01-20 00:56:45 +03:00
|
|
|
RUN apk update
|
|
|
|
|
|
|
|
# Install common php extensions
|
|
|
|
RUN docker-php-ext-install pdo_mysql
|
|
|
|
RUN docker-php-ext-install iconv
|
|
|
|
RUN docker-php-ext-install mbstring
|
|
|
|
RUN docker-php-ext-install calendar
|
|
|
|
|
|
|
|
RUN apk add --no-cache --virtual sqlite-libs
|
|
|
|
RUN apk add --no-cache --virtual sqlite-dev
|
|
|
|
RUN docker-php-ext-install pdo_sqlite
|
|
|
|
|
|
|
|
RUN apk add --no-cache --virtual icu-dev
|
|
|
|
RUN docker-php-ext-install intl
|
|
|
|
|
2019-02-02 12:53:34 +03:00
|
|
|
RUN apk add --no-cache --virtual libzip-dev zlib-dev
|
2017-01-20 00:56:45 +03:00
|
|
|
RUN docker-php-ext-install zip
|
|
|
|
|
|
|
|
RUN apk add --no-cache --virtual libpng-dev
|
|
|
|
RUN docker-php-ext-install gd
|
|
|
|
|
2019-03-05 15:39:45 +03:00
|
|
|
RUN apk add --no-cache postgresql-dev
|
|
|
|
RUN docker-php-ext-install pdo_pgsql
|
|
|
|
|
2017-01-20 00:56:45 +03:00
|
|
|
# Install APCu extension
|
2019-02-02 12:53:34 +03:00
|
|
|
ADD https://pecl.php.net/get/apcu-$APCU_VERSION.tgz /tmp/apcu.tar.gz
|
2017-01-20 00:56:45 +03:00
|
|
|
RUN mkdir -p /usr/src/php/ext/apcu\
|
|
|
|
&& tar xf /tmp/apcu.tar.gz -C /usr/src/php/ext/apcu --strip-components=1
|
|
|
|
# configure and install
|
|
|
|
RUN docker-php-ext-configure apcu\
|
|
|
|
&& docker-php-ext-install apcu
|
|
|
|
# cleanup
|
|
|
|
RUN rm /tmp/apcu.tar.gz
|
|
|
|
|
|
|
|
# Install APCu-BC extension
|
2019-02-02 12:53:34 +03:00
|
|
|
ADD https://pecl.php.net/get/apcu_bc-$APCU_BC_VERSION.tgz /tmp/apcu_bc.tar.gz
|
2017-01-20 00:56:45 +03:00
|
|
|
RUN mkdir -p /usr/src/php/ext/apcu-bc\
|
|
|
|
&& tar xf /tmp/apcu_bc.tar.gz -C /usr/src/php/ext/apcu-bc --strip-components=1
|
|
|
|
# configure and install
|
|
|
|
RUN docker-php-ext-configure apcu-bc\
|
|
|
|
&& docker-php-ext-install apcu-bc
|
|
|
|
# cleanup
|
|
|
|
RUN rm /tmp/apcu_bc.tar.gz
|
|
|
|
|
|
|
|
# Load APCU.ini before APC.ini
|
|
|
|
RUN rm /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini
|
|
|
|
RUN echo extension=apcu.so > /usr/local/etc/php/conf.d/20-php-ext-apcu.ini
|
|
|
|
|
|
|
|
# Install xdebug
|
2019-02-02 12:53:34 +03:00
|
|
|
ADD https://pecl.php.net/get/xdebug-$XDEBUG_VERSION /tmp/xdebug.tar.gz
|
2017-01-20 00:56:45 +03:00
|
|
|
RUN mkdir -p /usr/src/php/ext/xdebug\
|
|
|
|
&& tar xf /tmp/xdebug.tar.gz -C /usr/src/php/ext/xdebug --strip-components=1
|
|
|
|
# configure and install
|
|
|
|
RUN docker-php-ext-configure xdebug\
|
|
|
|
&& docker-php-ext-install xdebug
|
|
|
|
# cleanup
|
|
|
|
RUN rm /tmp/xdebug.tar.gz
|
|
|
|
|
|
|
|
# Install composer
|
|
|
|
RUN php -r "readfile('https://getcomposer.org/installer');" | php
|
|
|
|
RUN chmod +x composer.phar
|
|
|
|
RUN mv composer.phar /usr/local/bin/composer
|
2017-10-12 10:24:47 +03:00
|
|
|
|
|
|
|
# Make home directory writable by anyone
|
|
|
|
RUN chmod 777 /home
|