miguelbgouveia miguelbgouveia - 6 months ago 28
PHP Question

Can't change PHP variables in Joomla docker official container

I am using the joomla official docker container. The problem is that I need to install a component but I receive the following error message:

Maximum PHP file upload size is too small: This is set in php.ini in
both upload_max_filesize and post_max_size settings of your PHP

I know that I have to edit this PHP variables in order to install the component. I don't known where is the php.ini file. I already run the
function and get the path for the php configuration file in


The problem is there are no php.ini file.

How can I change these PHP variables? How to find the
file in the official joomla docker container?


You will have to provide your own php.ini file, and load that to the container as a volume. To do that, add the following flag to docker run command:

-v local/path/to/php.ini:/usr/local/etc/php/php.ini

If you are using docker compose, update the volumes section of your joomla container definition to look like so:

      - local/path/to/php.ini:/usr/local/etc/php/php.ini

You definitely shouldn't try to edit the configuration in a running container. If you'd do this, you'd loose all of your configuration together with the running container instance when you want to, for example, update the image.