/moodle-php-apache

PHP + Apache docker images for Moodle development

Primary LanguageShell

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.1 Bullseye 8.1, 8.1-bullseye Test and publish 8.1
PHP 8.0 Bullseye 8.0, 8.0-bullseye Test and publish 8.0
PHP 7.4 Bullseye 7.4, 7.4-bullseye Test and publish 7.4
PHP 8.1 Buster 8.1-buster Test and publish 8.1
PHP 8.0 Buster 8.0-buster Test and publish 8.0
PHP 7.4 Buster 7.4-buster Test and publish 7.4
PHP 7.3 Buster 7.3, 7.3-buster Test and publish 7.3 PHP 7.3 EOL
PHP 7.2 Buster 7.2, 7.2-buster Build Status PHP 7.2 EOL
PHP 7.1 Buster 7.1, 7.1-buster Build Status PHP 7.1 EOL
PHP 7.3 Stretch 7.3-stretch Build Status Stretch and PHP 7.3 EOL
PHP 7.2 Stretch 7.2-stretch Build Status Stretch and PHP 7.2 EOL
PHP 7.1 Stretch 7.1-stretch Build Status Stretch and PHP 7.1 EOL
PHP 7.0 Stretch 7.0, 7.0-stretch Build Status Stretch and PHP 7.0 EOL
PHP 5.6 Stretch 5.6, 5.6-stretch Build Status Stretch and PHP 5.6 EOL
PHP 7.1 Jessie 7.1-jessie Build Status Jessie and PHP 7.1 EOL
PHP 7.0 Jessie 7.0-jessie Build Status Jessie and PHP 7.0 EOL
PHP 5.6 Jessie 5.6-jessie Build Status Jessie and PHP 5.6 EOL

Example usage

The following command will expose the current working directory on port 8080:

$ docker run --name web0 -p 8080:80  -v $PWD:/var/www/html moodlehq/moodle-php-apache:7.1

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

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