1. Docker¶
Note
If you already have an instance of Moodle, you don’t need to install Docker and can skip to 2. Learning Locker. You will have to manually install Learning Locker using the Learning Locker installation guide though.
This page explains on how to get started with Docker.
1.1. Installation¶
The Docker folder in the repository contains a Docker configuration, which sets up a Docker environment in which an instance of Moodle and Learning Locker run side by side. When set up, the environment provides the connection needed between them to let Moodle send events to Learning Locker. Learning Locker can then be opened up to the virtual assistant component for testing.
If any problems occur during the Docker installation, please consult the Docker documentation.
1.1.1. Windows¶
Note
Docker for Windows only runs on 64-bit Windows 10 Pro, Enterprise, and Education.
Download Docker for Windows.
During configuration do not check “Use Windows containers instead of Linux containers”.
After the installation of Docker, the installation will prompt you to install HyperV. Follow the instruction on screen.
1.1.2. Mac¶
Download Docker for Mac.
1.1.3. Linux¶
To install Docker on Linux:
sudo apt install docker.io
sudo curl -L https://github.com/docker/compose/releases/download/1.18.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
1.2. Configuration¶
After installing Docker is complete, it is time to start using it:
Clone the Mofa git on Github.
Start Docker Desktop.
Open a Powershell or Terminal window and navigate to the Docker folder inside the project folder.
Run
build-dev.baton Windows or./build-dev.shon Linux, this will take a while.This script builds the Learning Locker app and engine for Docker.
To start the containers run
docker-compose up -d. Moodle still needs to install the first time running this, please be very patient and do not touch it untill Moodle works.
1.2.1. URLs¶
Now you will be able to view your own Moodle and Learning Locker instances at:
Moodle: http://localhost:8002
Learning Locker: http://localhost:8001
1.2.2. Login credentials¶
Log in to Moodle with the following credentials:
User: user
Password: bitnami
For Learning Locker, create a new superuser using the following command. Replace the brackets with your own information:
docker-compose exec api node cli/dist/server createSiteAdmin [email] [organisation] [password]
For example: docker-compose exec api node cli/dist/server createSiteAdmin mofa@gmail.com Utrecht_University welcome123!
1.2.3. Troubleshooting Docker commands¶
If you have any trouble with Docker, here are some of the basic commands.
docker ps: shows all the Docker containers by name and their current status.docker-compose down: shuts off all the containers.docker-compose down --rmi all -v: shuts off all the containers and deletes all images. Use when you’ve made an irreversible error.docker exec -it <container-name> /bin/powershell: opens the Powershell command shell for the container.docker logs -f <container-id>: shows the log of the container.