Moodle
Quick reference
- Maintained by: Krestomatio
- Where to get help: Mono repo issue tracker
Variants and tags
- moodle:4.1:
4.1, 4.1.9, moodle41-b80cf9291fb8999f649e75f3ebb242331bfd7cbe
- moodle:4.1-bundle:
4.1-bundle, 4.1.9-bundle, moodle41_bundle-b80cf9291fb8999f649e75f3ebb242331bfd7cbe
- moodle:4.1-httpd:
4.1-httpd, 4.1.9-httpd, moodle41_httpd24-b80cf9291fb8999f649e75f3ebb242331bfd7cbe
- moodle:4.1-kio:
4.1-kio, 4.1.9-kio, moodle41_kio-b80cf9291fb8999f649e75f3ebb242331bfd7cbe
- moodle:4.1-nginx:
4.1-nginx, 4.1.9-nginx, moodle41_nginx120-b80cf9291fb8999f649e75f3ebb242331bfd7cbe
- moodle:4.1-nginx_php-fpm:
4.1-nginx_php-fpm, 4.1.9-nginx_php-fpm, moodle41_nginx120_php80-fpm-b80cf9291fb8999f649e75f3ebb242331bfd7cbe
- moodle:4.1-php-fpm:
4.1-php-fpm, 4.1.9-php-fpm, moodle41_php80-fpm-b80cf9291fb8999f649e75f3ebb242331bfd7cbe
Image Variants
moodle:4.1
This CentOS 9 Stream minimal based container image runs PHP 8.0 (default) or NGINX 1.20 for Moodle 4.1. Use it as an inmutable image packing Moodle source, (optionally) moodle plugins, and executables for php-fpm and nginx.
It includes a copy of Moodle source code, ready in the image public folder. A specific git commit is used to get the Moodle source version. That commit is fetch every build from remote repo to keep it up to date. It is build from the latest available Moodle version (depending on the remote repo and branch set).
Details
- Moodle remote repo: https://github.com/moodle/moodle.git
- Moodle version: 4.1.9
- Moodle version number: 2022112809.13
- Moodle commit: fef8dda150bbb133865a80e823c4759ffb7fbff7
- Moodle remote branch: MOODLE_401_STABLE
Custom builds
This Dockerfile allows setting OS extra packages, Moodle remote repo, Moodle repo branch and/or additional Moodle plugins. For that purpose, use build args to customize the build as you need.
Extra packages
For building with OS extra packages, use ARG_INSTALL_EXTRA_PKGS
:
docker build . -t my_moodle_image:my_tag \
--build-arg ARG_INSTALL_EXTRA_PKGS='php-xdebug php-mysqlnd'
Moodle remote
For building from a different Moodle remote, use ARG_MOODLE_REMOTE
:
docker build . -t my_moodle_image:my_tag \
--build-arg ARG_MOODLE_REMOTE='https://github.com/moodle/moodle.git'
Moodle branch
For building from a different Moodle branch, use ARG_MOODLE_BRANCH
:
docker build . -t my_moodle_image:my_tag \
--build-arg ARG_MOODLE_BRANCH='MOODLE_401_STABLE'
Moodle plugins
For installing plugins while building the main Dockerfile (slower), use ARG_MOODLE_PLUGIN_LIST
:
docker build . -t my_moodle_image:my_tag \
--build-arg ARG_MOODLE_PLUGIN_LIST=''
For building only to install additional moodle plugins (faster), create a Dockerfile like the following and then build.
Example of Dockerfile.plugins
:
# Dockerfile.plugins
FROM quay.io/krestomatio/moodle:4.1
# Install additional plugins, a space separated arg, (if any)
# Argument is also a mechanism to invalidate cache if changed
ARG ARG_MOODLE_PLUGIN_LIST=""
ENV MOODLE_PLUGIN_LIST=${ARG_MOODLE_PLUGIN_LIST}
RUN if [ -n "${MOODLE_PLUGIN_LIST}" ]; then /usr/libexec/moodle/install-plugin-list -p "${MOODLE_PLUGIN_LIST}"; fi && \
rm -rf /tmp/moodle-plugins
Example of build using Dockerfile.plugins
:
# Build
docker build . -t my_moodle_image:my_tag \
-f Dockerfile.plugins \
--build-arg ARG_MOODLE_PLUGIN_LIST=''
PHP-FPM or NGINX
The image packs both programs: PHP-FPM and Nginx. However, it only runs one, with a non-root user. This design is for those programs to run in different containers, using one image. By default, in a Kubernetes cluster, it runs php-fpm with user 48. For nginx, set pod args to 'nginx' and run it as user 1001. For a OKD cluster, setting args to nginx
will suffice.
Configuration files
For adjusting PHP-FPM or Nginx config, just place the .ini or .conf files in the respective folders.
/etc/php.d/
: PHP .ini extra configuration/etc/php-fpm.d/
: PHP-FPM .conf extra configuration/etc/nginx/default.d/
: Nginx .conf server extra configuration
moodle:4.1-bundle
Extends moodle:4.1 to add additional Moodle plugins.
Details
- Moodle remote repo: https://github.com/moodle/moodle.git
- Moodle version: 4.1.9
- Moodle version number: 2022112809.13
- Moodle commit: fef8dda150bbb133865a80e823c4759ffb7fbff7
- Moodle remote branch: MOODLE_401_STABLE
Plugins
The following is the list of plugins:
moodle:4.1-httpd
Image based on CentOS 9 Stream minimal with Apache HTTP Server for Moodle app/source (not included)
moodle:4.1-kio
Krestomatio Moodle variant
Details
- Moodle remote repo: https://github.com/krestomatio/moodle.git
- Moodle version: 4.1.9
- Moodle version number: 2022112809.13
- Moodle commit: 905a7c159e7bc9fcaa4f20832498a00fe1fe7c7c
- Moodle remote branch: MOODLE_401_STABLE_KIO
Plugins
The following is the list of plugins:
- block_checklist
- block_completion_progress
- block_xp
- format_tiles
- format_onetopic
- format_grid
- format_topcoll
- gradeexport_checklist
- mod_questionnaire
- mod_attendance
- mod_checklist
- mod_customcert
- mod_zoom
- mod_game
- theme_moove
- theme_boost_union
- auth_oidc
- block_microsoft
- local_o365
- local_office365
- repository_office365
- theme_boost_o365teams
- local_onenote
- assignfeedback_onenote
- assignsubmission_onenote
- plagiarism_turnitin
- plagiarism_turnitinsim
moodle:4.1-nginx
Image based on CentOS 9 Stream minimal with nginx HTTP Server for Moodle app/source (not included)
moodle:4.1-nginx_php-fpm
Image based on CentOS 9 Stream minimal with nginx HTTP Server and PHP-FPM for Moodle app/source (not included)
moodle:4.1-php-fpm
Moodle PHP-FPM image based on CentOS 9 Stream minimal for Moodle app/source (not included)