Docker Moodle (version 3.3): localhost not working (CentOS)

Docker Moodle (version 3.3): localhost not working (CentOS)

by Alejandro Vizcaíno -
Number of replies: 2

I have to work with Moodle, so I installed Moodle from here: https://hub.docker.com/r/jauer/moodle

I created the docker containers.

MySQL container:

docker run -d --name DB -p 3306:3306 -e MYSQL_DATABASE=moodle -e MYSQL_ROOT_PASSWORD=moodle -e MYSQL_USER=moodle -e MYSQL_PASSWORD=moodle mysql

Moodle container:

docker run -d -P --name moodle --link DB:DB -e MOODLE_URL=http://localhost:8081 -p 8081:80 jhardison/moodle

Result after docker ps -a:

CONTAINER ID   IMAGE              COMMAND                  CREATED         STATUS                     PORTS                                                                              NAMES
647128e9d155   jhardison/moodle   "/etc/apache2/foregr…"   7 minutes ago   Up 7 minutes               0.0.0.0:8081->80/tcp, :::8081->80/tcp, 0.0.0.0:49157->443/tcp, :::49157->443/tcp   moodle

e83ad7433905   mysql              "docker-entrypoint.s…"   7 minutes ago   Up 7 minutes               0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060/tcp                               DB

I open http://localhost:8081 but nothing is showing. Message: Can't connect. Also http://localhost:8080 is a white webpage. It loads but without content.

My Apache version:

httpd -v
Server version: Apache/2.4.6 (CentOS)
Server built:   Nov 16 2020 16:18:20

I have a Windows host machine and I am connecting via ssh to a CentOS VM. I have also installed SimpleSAMLphp in the VM, and I can access to it from Windows at https://localhost:8443/simplesaml/module.php

I need to make Moodle work. I have read forum topics, tried different ways to install Moodle but still can't achieve what I want. It must be installed in CentOS.

Thanks in advance and I hope you could help me.


Average of ratings: -
In reply to Alejandro Vizcaíno

Re: Docker Moodle (version 3.3): localhost not working (CentOS)

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Is there a particular reason you used that docker container?

That's not the official way to install Moodle, we don't know what it does and so have very little chance of being able to help. If the person who owns the github page can't help I would suggest installing Moodle using methods documented on moodle.org
In reply to Howard Miller

Re: Docker Moodle (version 3.3): localhost not working (CentOS)

by Alejandro Vizcaíno -
There is not a particular reason. It is just the link my teacher provided to us as an example. I will try another method then, thanks.