Closed tbarbette closed 6 days ago
Hi!
the value is ignored and attaching to the container I see the change is not persisted
How did you check it in your container? Please paste your command and result in text.
Thanks for the help !
docker exec -it suspicious_meitner cat /etc/php/8.0/apache2/php.ini | grep post_max_size <
post_max_size = 10M
suspicious_meitner being the name of the container running aside.
I think you've missed two env vars PHP_UPLOAD_MAX_FILESIZE
and PHP_POST_MAX_SIZE
:
These two env vars will overwrite the value in the INI file:
Hence, to change the config, your Dockerfile should look like this:
FROM mattrayner/lamp:latest-1804
# Your custom commands
ENV PHP_UPLOAD_MAX_FILESIZE=1024M
ENV PHP_POST_MAX_SIZE=1024M
CMD ["/run.sh"]
See also: LegacyKeyValueFormat | Docker Docs
Ah yes indeed ! Did not see the env in the doc :) Sorry !
Hi all!
I'd like to automatize the famous change to increase post_max_size &cie. I tried this Dockerfile but even if the cat confirms the change is written, the value is ignored and attaching to the container I see the change is not persisted, it's back to 10M.
Any idea?