moodle-php-apache: A Moodle PHP Environment
A Moodle PHP environment configured for Moodle development based on Official PHP Images .
Versions
PHP Version Variant Tags Status Notes PHP 8.0 Bullseye 8.0, 8.0-bullseye PHP 7.4 Bullseye 7.4, 7.4-bullseye PHP 8.0 Buster 8.0-buster PHP 7.4 Buster 7.4-buster PHP 7.3 Buster 7.3, 7.3-buster PHP 7.2 Buster 7.2, 7.2-buster PHP 7.2 EOL PHP 7.1 Buster 7.1, 7.1-buster PHP 7.1 EOL PHP 7.3 Stretch 7.3-stretch Stretch EOL PHP 7.2 Stretch 7.2-stretch Stretch and PHP 7.2 EOL PHP 7.1 Stretch 7.1-stretch Stretch and PHP 7.1 EOL PHP 7.0 Stretch 7.0, 7.0-stretch Stretch and PHP 7.0 EOL PHP 5.6 Stretch 5.6, 5.6-stretch Stretch and PHP 5.6 EOL PHP 7.1 Jessie 7.1-jessie Jessie and PHP 7.1 EOL PHP 7.0 Jessie 7.0-jessie Jessie and PHP 7.0 EOL PHP 5.6 Jessie 5.6-jessie Jessie and PHP 5.6 EOL
Example usage
The following command will expose the current working directory on port 8080:
$ docker run --name web0 -e APACHE_WEB_ROOT=$BUILD_DIRECTORY -p 8080:80 -v $PWD:/var/www/html moodlehq/moodle-php-apache:7.1
Copy
Features
Preconfigured with all php extensions required for Moodle development and all database drivers
Serves wwroot configured at /var/www/html/
For PHP 7.3 and up, both linux/amd64 and linux/arm64 images are being built. Note that linux/arm64 doesn't support the sqlsrv and oci extensions yet. Other than that, both architectures work exactly the same.
Verified by automated tests .
Autobuilt from GHA, on push.
Directories
To faciliate testing and easy setup the following directories are created and owned by www-data by default:
/var/www/moodledata
/var/www/phpunitdata
/var/www/behatdata
/var/www/behatfaildumps
Upcoming
Currently trying to implement php 7.2
See also
This container is part of a set of containers for Moodle development, see also:
moodle-docker a docker-composer based set of tools to get Moodle development running with zero configuration
moodle-db-mssql Microsoft SQL Server for Linux configured for Moodle development
moodle-db-oracle Oracle XE configured for Moodle development