can't update php.ini file in Docker container

前端 未结 3 1984
一生所求
一生所求 2020-12-24 12:55

I\'m trying to set Magento2 on Docker with Nginx & PHP7.

I\'ve added a custom php.ini file as recommended by the PHP7 Docker image. I can see from phpinfo.php t

3条回答
  •  离开以前
    2020-12-24 13:36

    Add a volumes: section to your php service in the docker-compose.yml file, map a local directory with a custom.ini file to /usr/local/etc/php/conf.d, and restart your container. Whatever valid settings in that file will override those from the main php.ini file. (Incidentally you can do the same with MySQL but not with Nginx).

    This works in my own project:

    php: volumes: - ./localpath/custom.ini:/usr/local/etc/php/conf.d/custom.ini

提交回复
热议问题