can't update php.ini file in Docker container
<p>I'm trying to set Magento2 on Docker with Nginx &amp; PHP7.</p>

<p>I've added a custom php.ini file as recommended by the <a href="https://hub.docker.com/_/php/" rel="noreferrer">PHP7 Docker image</a>.  I can see from phpinfo.php that it's loading my php.ini file but none of my updates are there.
<a href="https://i.stack.imgur.com/9NGcb.png" rel="noreferrer"><img src="https://i.stack.imgur.com/9NGcb.png" alt="enter image description here"></a>
<a href="https://i.stack.imgur.com/XpmFw.png" rel="noreferrer"><img src="https://i.stack.imgur.com/XpmFw.png" alt="enter image description here"></a>
<a href="https://i.stack.imgur.com/Frcpz.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Frcpz.png" alt="enter image description here"></a></p>

<p>It should be:</p>

<pre><code>memory_limit = 2G
max_execution_time = 800
</code></pre>

<p>I've checked the PHP container and I can see the php.ini file is there with the correct settings, or so I think?</p>

<pre><code>$ docker exec -it mymagento2docker_php_1 /bin/bash 
# cat /usr/local/etc/php/php.ini                                                                                                                  
; This file is created automatically by the docker build

memory_limit = 2G
max_execution_time = 800
</code></pre>

<p>What am I doing wrong?  Below are some more details, thanks in advance!</p>

<hr>

<h2>Docker Project</h2>

<pre><code>.
├── docker-compose.yml
├── index.php
├── magento2
│   ├── [DIRECTORIES &amp; FILES OMMITED]
│                   
├── nginx
│   ├── Dockerfile
│   ├── default.conf
│   └── nginx.conf
├── output.txt
├── php
    ├── Dockerfile
    └── config
        └── php.ini
</code></pre>

<hr>

<h2>docker-compose.yml</h2>

<pre><code>nginx:
    build: ./nginx/
    ports:
        - 80:80
    links:
        - php
    volumes_from:
        - app

php:
    build: ./php/
    expose:
        - 9000
    links:
        - mysql
    volumes_from:
        - app

app:
    image: php:7.0-fpm
    volumes:
        - ./magento2:/var/www/html
    command: "true"

mysql:
    image: mysql:latest
    volumes_from:
        - data
    ports:
        - "3306:3306"        
    environment:
        MYSQL_ROOT_PASSWORD: mage2
        MYSQL_DATABASE: mage2
        MYSQL_USER: mage2
        MYSQL_PASSWORD: mage2 

data:
    image: mysql:latest
    volumes:
        - /var/lib/mysql
    command: "true"

phpmyadmin:
    image: phpmyadmin/phpmyadmin
    ports:
        - 8080:80
    links:
        - mysql
    environment:
        PMA_HOST: mysql    
</code></pre>

<hr>

<h2>php/Dockerfile</h2>

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

# Install dependencies
RUN apt-get update \
  &amp;&amp; apt-get install -y \
    cron \
    libfreetype6-dev \
    libicu-dev \
    libjpeg62-turbo-dev \
    libmcrypt-dev \
    libpng12-dev \
    libxslt1-dev

# Configure the gd library
RUN docker-php-ext-configure \
  gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/

# Install required PHP extensions
RUN docker-php-ext-install \
  gd \
  intl \
  mbstring \
  mcrypt \
  pdo_mysql \
  xsl \
  zip \
  soap

# Install the 2.4 version of xdebug that's compatible with php7
RUN pecl install -o -f xdebug-2.4.0

COPY config/php.ini /usr/local/etc/php/
</code></pre>

<hr>

<pre><code>## php/config/php.ini ##
; This file is created automatically by the docker build

memory_limit = 2G
max_execution_time = 800
</code></pre>

<h1>UPDATE</h1>

<p>I've tried restarting nginx with the below, but it did not work.</p>

<pre><code>$ docker exec -it mymagento2docker_php_1 /bin/bash 
# /etc/init.d/nginx restart                                                                                                                       
bash: /etc/init.d/nginx: No such file or directory
# service nginx restart    
nginx: unrecognized service
# nginx -s reload          
bash: nginx: command not found
# exit
$ docker restart mymagento2docker_nginx_1
mymagento2docker_nginx_1

$ docker exec -it mymagento2docker_nginx_1 /bin/bash 
# /etc/init.d/nginx restart                                                                                                                                   
Restarting nginx: nginxross in ~/my-magento2-docker
$ docker-compose ps
            Name                          Command             State            Ports          
---------------------------------------------------------------------------------------------
mymagento2docker_app_1          true                          Exit 0                          
mymagento2docker_data_1         docker-entrypoint.sh true     Exit 0                          
mymagento2docker_mysql_1        docker-entrypoint.sh mysqld   Up       0.0.0.0:3306-&gt;3306/tcp 
mymagento2docker_nginx_1        nginx -g daemon off;          Exit 0                          
mymagento2docker_php_1          php-fpm                       Up       9000/tcp               
mymagento2docker_phpmyadmin_1   /run.sh phpmyadmin            Up       0.0.0.0:8080-&gt;80/tcp   
ross in ~/my-magento2-docker
$ docker-compose up -d
Starting mymagento2docker_app_1
Starting mymagento2docker_data_1
mymagento2docker_mysql_1 is up-to-date
mymagento2docker_phpmyadmin_1 is up-to-date
mymagento2docker_php_1 is up-to-date
Starting mymagento2docker_nginx_1
ross in ~/my-magento2-docker
$ docker exec -it mymagento2docker_nginx_1 /bin/bash 
# service nginx restart                                                                                                                                       
Restarting nginx: nginxross in ~/my-magento2-docker
$ docker-compose up -d
Starting mymagento2docker_app_1
Starting mymagento2docker_data_1
mymagento2docker_mysql_1 is up-to-date
mymagento2docker_phpmyadmin_1 is up-to-date
mymagento2docker_php_1 is up-to-date
Starting mymagento2docker_nginx_1
ross in ~/my-magento2-docker
$ docker exec -it mymagento2docker_nginx_1 /bin/bash 
# nginx -s reload                                                                                                                                             
2016/10/05 14:07:43 [notice] 12#12: signal process started
# 
</code></pre>