Sign inSign up

zebradil/moodle

By zebradil

Updated over 8 years ago

Moodle docker image

Image
1

1.3K

zebradil/moodle repository overview

docker-moodle

All you need to get your lightweight Moodle instance.

Moodle 3.2

Lightweight docker container based on Alpine Linux includes Moodle 3.2, Apache, PHP7.1, and all php-extensions required by Moodle.

Run container

$ docker run -p 80:80
             -v /var/moodledata:/var/moodledata
             -e "MOODLE_DB_TYPE=mysqli" \
             -e "MOODLE_DB_HOST=db" \
             -e "MOODLE_DB_NAME=moodle" \
             -e "MOODLE_DB_USER=moodle" \
             -e "MOODLE_DB_PASS=moodlepass" \
             -e "MOODLE_URL=http://localhost" \
              zebradil/moodle:3.2

As you see, some environment variables should be set. All of them must be non-empty, except MOODLE_DB_PASS — it may be empty, but must be set.

At this time MySQL database only supported. It may work with MariaDB I didn't check it.

Deploy stack

Instead of having a deal with database by your own, you could use stack provided.

$ MYSQL_ROOT_PASSWORD=root \
  MYSQL_DATABASE=moodle \
  MYSQL_USER=moodle \
  MYSQL_PASSWORD=moodlepass \
  MOODLE_URL=http://localhost \
  docker stack deploy -c docker-compose.yml moodle

Notice, that there are another set of environment variables here.

Moodle 3.2 with Coderunner plugin

All the same, but name and compose file:

  • zebradil/moodle-coderunner:3.2
  • docker-compose-coderunner.yml

Inspired by bunch of sergiogomez's docker-moodle forks.

Tag summary

Content type

Image

Digest

Size

113 MB

Last updated

over 8 years ago

docker pull zebradil/moodle