doughnut-wedding/docker/php/Dockerfile

48 lines
1.2 KiB
Docker

FROM php:7.1-fpm-alpine
#FROM php-7.1.4-fpm-alpine
ENV PHPIZE_DEPS \
autoconf \
file \
g++ \
gcc \
libc-dev \
make \
pkgconf \
re2c \
sqlite-dev \
hiredis-dev \
git
RUN apk update && apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && apk add hiredis libstdc++
COPY ./icu4c-58_2-src.tgz /tmp
RUN ln -s /usr/include/locale.h /usr/include/xlocale.h && \
cd /tmp && \
tar -xvf ./icu4c-58_2-src.tgz && \
cd /tmp/icu/source && \
./runConfigureICU Linux && \
make && make install && cd && rm -rf /tmp/icu
RUN /usr/local/bin/docker-php-ext-install pdo_mysql intl opcache
RUN echo "y\n"|pecl install scrypt && /usr/local/bin/docker-php-ext-enable scrypt
RUN echo "y\n"|pecl install xdebug && /usr/local/bin/docker-php-ext-enable xdebug
# RUN echo "n\n"|pecl install apcu && /usr/local/bin/docker-php-ext-enable apcu
RUN pecl install redis && /usr/local/bin/docker-php-ext-enable redis
RUN git clone https://github.com/nrk/phpiredis.git /tmp/phpiredis && \
cd /tmp/phpiredis && \
phpize && \
./configure --enable-phpiredis && \
make && make install && /usr/local/bin/docker-php-ext-enable phpiredis
RUN apk del .build-deps && apk del git
COPY ./php.ini /usr/local/etc/php