FROM php:7.2-fpm-alpine

RUN apk add --no-cache $PHPIZE_DEPS \
    && pecl install xdebug\
    && docker-php-ext-enable xdebug
#
## Use the default production configuration
#RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
#
## Override with custom opcache settings
#COPY config/opcache.ini $PHP_INI_DIR/conf.d/
#
## Install require components
#RUN apt-get update && apt-get install -y libcurl4-openssl-dev libcurl3-dev
#RUN docker-php-ext-install mbstring
#
## Xdebug
#RUN pecl install xdebug
#RUN docker-php-ext-enable xdebug
COPY docker-phpunit-entrypoint /usr/bin/docker-phpunit-entrypoint
COPY etc/php/conf.d/xdebug.ini $PHP_INI_DIR/conf.d/

# Set the entry points
ENTRYPOINT ["docker-phpunit-entrypoint"]