Would you like to learn how to install Moodle using Docker on Ubuntu Linux? In this tutorial, we are going to show you all the steps required to perform the Moodle installation using Docker on a computer running Ubuntu Linux in 5 minutes or less.
• Ubuntu 20.04
• Ubuntu 18.04
• Ubuntu 19.04
• Moodle 3.9.2
• MariaDB 10.5.5
Tutorial Moodle – Docker Installation
Install the Docker service.
Create a Docker network.
Download the MariaDB docker image from the online repository.
Download the Moodle docker image from the online repository.
List the Docker images installed on your system.
Here is the command output:
Create a docker volume to store the MariaDB persistent data.
Verify the persistent data directory.
Here is the command output:
Optionally, create a symbolic link to an easier access location.
Start a MariaDB container with persistent data storage.
Here is the command output:
In our example, the MariaDB image was used to start a new container.
The new container has persistent data storage.
The container ID is 2df3ce59a3d8e52723554258d2781da37223249848064b0cadb1c80e57d0d1d0.
The database ROOT account password configured was kamisama123.
A database named Moodle was created.
A database account named Moodle was created and the password kamisama123 was configured.
Create a docker volume to store Moodle persistent data.
Verify the persistent data directory.
Here is the command output:
Optionally, create a symbolic link to an easier access location.
Start a Moodle container with persistent data storage.
Here is the command output:
In our example, the Moodle image was used to start a new container.
The new container has persistent data storage.
The container ID is 5db92cf1bf78b7117350a2943fd5002d35073bdbbf3a0175a2ee0223a7156431.
It may take up to 5 minutes for Moodle to finish the installation process.
Tutorial Docker – Moodle installation
Open your browser and enter the IP address of your web server.
In our example, the following URL was entered in the Browser:
• http://192.168.100.10
The Moodle web interface should be presented, click on the Login option.
On the prompt screen, enter the following information.
• Username: user
• Password: bitnami
After a successful login, the Moodle dashboard will be displayed.
Congratulations! You have finished the Moodle Docker installation.
Tutorial Moodle – Docker container management
Verify the status of all Docker containers using the following command:
Verify the status of a container.
To stop a container, use the following command:
To start a container, use the following command:
To restart a container, use the following command:
In case of error, use the following command to verify the container logs.
In our examples, we demonstrated how to manage Moodle containers.