Skip to content
This repository was archived by the owner on May 25, 2021. It is now read-only.

Conversation

jangottweiss
Copy link

I think you have to add a name to the mysql Container. If you don't add the name "DB" you can't link the moodle Container.

@jthmiranda
Copy link

@jan1993 Actually, you can define a random name to mysql container

docker run --name anynameyoulike ... centurylink/mysql

I applied this line in my server

docker run -d -v /etc/localtime:/etc/localtime -p 3306 --name moodle_mysql  -e MYSQL_DATABASE=moodle -e MYSQL_USER=moodle -e MYSQL_PASSWORD=moodle --volumes-from moodle_data -c 512 --restart=always -m 512m centurylink/mysql

To get the job done you need to define on the moodle container the alias DB for the option link

docker run -d --name moodle_server --link anynamedb:DB  ... jauer/moodle ```
Although, there is an option that I dont get it

Why the need to expose port 3306 when run the mysql container, this option must be not necessary because the moodle server is linked to mysql container and it can reach internally the port, so you can avoid exposing the mysql port to the host

But to successfully execute the whole thing is necessary expose the port to host, without this, moodle can't start

docker run -d --name moodle_db -port 3306:3306 ... centurylink/mysql

@hugoliv
Copy link

hugoliv commented Oct 4, 2015

Could you please help me to make things works with docker-compose, official mysql image and data-only container?

With this docker-compose.yml, the installation doesn't end normally:

 moodle:
   restart: always
   image: jauer/moodle
   ports:
     - 8080:80
   links:
     - mysql:DB
   environment:
     - MOODLE_URL=http://MY_URL:8080

 mysql:
   image: mysql:latest
   environment:
     - MYSQL_ROOT_PASSWORD=root
     - MYSQL_DATABASE=moodle
     - MYSQL_USER=moodle
     - MYSQL_PASSWORD=password
   volumes_from:
     - mysqldata

 mysqldata:
   image: busybox:latest
   volumes:
     - /var/lib/mysql
   command:
     - /bin/true

Installation ends with white page:
pb

jda pushed a commit that referenced this pull request Dec 5, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants