How to setup DOCKER for php7?

The problem is that I have no way to configure php.ini to php-cli and php-fpm separately.

Dockerfile:
# https://hub.docker.com/_/php/
# PHP7-FPM
FROM php:7.1-fpm-alpine

RUN apk add --no-cache \
 autoconf \
 curl \
 g++ \
 gcc \
 git \
 libtool \
 make \
 tar \
 freetype-dev \
 libjpeg-turbo-dev \
 libmcrypt-dev \
 libpng-dev \
 postgresql-dev \
 zip \
 unzip \
wget

RUN mkdir /var/log/php

RUN docker-php-ext-configure gd \
 -with-freetype-dir=/usr/include/ \
 -with-png-dir=/usr/png/ \
 -with-jpeg-dir=/usr/format: jpeg/ \
 && docker-php-ext-configure pgsql \
 -- with-pgsql=/usr/include/postgresql/ \

 # Finally, install php extensions compiled
 && docker-php-ext-install \
 gd \
 mcrypt \
 mysqli \
 pdo \
 pdo_pgsql \
 pdo_mysql \
 mbstring \
 tokenizer \
 opcache \
 exif \
pgsql

# Intl
RUN apk add --no-cache icu-dev \
 && docker-php-ext-install intl


# Imagick
RUN apk add --no-cache --virtual .imagick-build-dependencies \
 imagemagick-dev \
 && apk add --virtual .imagick-runtime-dependencies \
 imagemagick \

 && IMAGICK_TAG="3.4.2" \
 && git clone -o ${IMAGICK_TAG} --depth 1 https://github.com/mkoppanen/imagick.git /tmp/imagick \
 && cd /tmp/imagick \

 && phpize \
 && ./configure \
 && make \
 && make install \

 && echo "extension=imagick.so" > /usr/local/etc/php/conf.d/ext-imagick.ini \

 && apk del .imagick-build-dependencies


From docker-compose.yml
...
php:
 container_name: travellizy_php
 build: ./docker/php
 restart: always
volumes:
 - ./www:/www
 - ./docker/php/php.ini:/usr/local/etc/php/conf.d/php.ini
 - ./docker/php/php-fpm.conf:/usr/local/etc/php-fpm.d/php-fpm.conf
 - ./docker/php/log:/var/log/php
...


Please ask fpm for php.and ini, respectively, for the cli ?
August 23rd 19 at 10:48
1 answer
August 23rd 19 at 10:50
Solution
The answer from user reviews

Find more questions by tags DockerPHP