PHP date.timezone not found with Docker & PHP-FPM
<p>I'm creating a Symfony environment (PHP-FPM, Nginx, &amp; more) with Docker &amp; Docker-compose.</p>

<p>But, PHP does not use my php.ini and ignores the config (date.timezone parameter is not found in my Symfony application). </p>

<p>Of course, when I go on my container, the date.timezone is correctly set in the 2 php.ini (cli &amp; FPM).</p>

<p>I don't understand why, but it works if I put my php.ini in <strong>/usr/local/etc/php/</strong> folder (wtf)</p>

<p>Did I miss something? </p>

<p><strong>docker-compose.yml :</strong></p>

<pre><code>nginx:
    image: nginx
    volumes:
        - "./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro"
    links:
        - "php:php"
    ports:
        - "80:80"
        - "443:443"
    working_dir: "/etc/nginx"

php:
    build: docker/php
    volumes:
        - ".:/var/www:rw"
    working_dir: "/var/www"
</code></pre>

<p><strong>Dockerfile :</strong></p>

<pre><code>FROM php:5-fpm

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update &amp;&amp; \
    apt-get install -y php5-common php5-fpm php5-cli php5-mysql php5-apcu php5-intl php5-imagick &amp;&amp; \
    apt-get clean &amp;&amp; \
    rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN sed -i 's/;date.timezone =/date.timezone = "Europe\/Paris"/g' /etc/php5/fpm/php.ini
RUN sed -i 's/;date.timezone =/date.timezone = "Europe\/Paris"/g' /etc/php5/cli/php.ini

RUN usermod -u 1000 www-data
</code></pre>