docker-moodle icon indicating copy to clipboard operation
docker-moodle copied to clipboard

modifying php.ini in the image

Open o0larrylurex0o opened this issue 6 years ago • 2 comments

Hello, I'm struggling with your image to modify the php.ini to upload bigger file (limited to 8MO by default)

Is is possible to modify that in the docker file so it can be set from the beginning ? as explained here https://docs.moodle.org/36/en/File_upload_size#Upload_file_size_restrictions

thanks a lot

o0larrylurex0o avatar Dec 27 '18 12:12 o0larrylurex0o

Hello, I wanted to know how I can increase the upload space since the limit is only 2mb ?

stalin29 avatar Sep 18 '20 18:09 stalin29

I think you should add a new volume in docker-compose.yml mapping a php.ini path in the host, and the one in the container.

VOLUMES:
    - ./config.php:/var/www/html/config.php
    - ./apache2.conf:/etc/apache2/apache2.conf
    - ./php.ini:/etc/php/7.4/cli/php.ini

Check the path for php.ini in the container: docker exec -ti <container_name>: php --ini | grep "Loaded Configuration File"

If you like, you could copy the file from te docker to the host machine doing this: docker cp <container_name>:/etc/php/7.4/cli/php.ini .

smarbos avatar Oct 28 '21 06:10 smarbos