Closed HenkVanMaanen closed 3 years ago
You could map the /usr/local/etc/php
path to a local directory so that you can edit the php.ini file on your local filesystem. That's probably the easiest solution.
Best to use an external INI file that is copied to /usr/local/etc/php/conf.d
So if you wanted to override the PHP memory limit in /usr/local/etc/php/php.ini, create a file accessible to docker context with following contents and then copy it over in Dockerfile.
File: php/conf.d/php-overrides.ini
[PHP]
memory_limit=512M
Or you can use environment variable substitution using and ensuring your docker container's environment variables are setup correctly.
[PHP]
memory_limit=${PHP_MEMORY_LIMIT}
File: Dockerfile
FROM bubbajames/sendy:latest
# Override PHP settings
COPY ./php/conf.d/php-overrides.ini /usr/local/etc/php/conf.d
...
Add an option / env variable to set the memory_limit in the php.ini file.
Or how could I set this variable permenantly ?