how can i modify max memory-limit in php.ini in docker container
Solution 1:
Depends on the image, but usually it's enough to do
ENV PHP_MEMORY_LIMIT=128M
inside the Dockerfile
.
Beware: the unit is a single letter, M
for MB (or G
for GB).
Otherwise it will silently ignore the value and keep the default limit (64M
? Do a RUN echo $PHP_MEMORY_LIMIT
to know it).
I often fall in that trap because of habit.