title: Docker Wordpress container with custom php.ini file settings
body: <p>I'm running Wordpress (and PHPMyAdmin and MySQL) in a Docker container, and I need to make a change to increase the maximum uploadable file size for PHPMyAdmin</p>
  
  <p>I researched a number of solutions and found a suggestion to create a custom <code>uploads.ini</code> file and then include this file in the <code>docker-compose</code> file.</p>
  
  <p>So I have this:</p>
  
  <p><em>uploads.ini</em></p>
  
  <pre><code>file_uploads = On
  memory_limit = 64M
  upload_max_filesize = 64M
  post_max_size = 64M
  max_execution_time = 600
  </code></pre>
  
  <p><em>docker-compose.yml</em></p>
  
  <pre><code>version: '3'
  
  services:
    # Database
    db:
      image: mysql:5.7
      volumes:
        - db_data:/var/lib/mysql
      restart: always
      environment:
        MYSQL_ROOT_PASSWORD: password
        MYSQL_DATABASE: wordpress
        MYSQL_USER: wordpress
        MYSQL_PASSWORD: wordpress
      networks:
        - wpsite
    # phpmyadmin
    phpmyadmin:
      depends_on:
        - db
      image: phpmyadmin/phpmyadmin
      restart: always
      ports:
        - '8080:80'
      environment:
        PMA_HOST: db
        MYSQL_ROOT_PASSWORD: password 
      networks:
        - wpsite
    # Wordpress
    wordpress:
      depends_on:
        - db
      image: wordpress:latest
      ports:
        - '8000:80'
      restart: always
      volumes:
        - './:/var/www/html'
        - ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
      environment:
        WORDPRESS_DB_HOST: db:3306
        WORDPRESS_DB_USER: wordpress
        WORDPRESS_DB_PASSWORD: wordpress
      networks:
        - wpsite
  networks:
    wpsite:
  volumes:
    db_data:
  </code></pre>
  
  <p>I have included the <code>uploads.ini</code> file in the <code>volumes</code> for <code>wordpress</code></p>
  
  <pre><code>volumes:
        - './:/var/www/html'
        - ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
  </code></pre>
  
  <p>But sadly after running the <code>docker-compose</code> and opening localhost:8080 to go to PHPMyAdmin I still only have a maximum file upload size of 2m, not the 64m in my custom file</p>