From 0c0bdcc0f4f8dc07793ada42608a97dfa3e3ffe6 Mon Sep 17 00:00:00 2001 From: kev Date: Mon, 28 Dec 2015 14:55:31 +0800 Subject: [PATCH] fix moodle --- moodle/Dockerfile | 21 ++++++++++++++++----- moodle/README.md | 13 ++++++++++++- moodle/docker-compose.yml | 16 ++++++++++++++++ 3 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 moodle/docker-compose.yml diff --git a/moodle/Dockerfile b/moodle/Dockerfile index a6ddd61..64692d9 100644 --- a/moodle/Dockerfile +++ b/moodle/Dockerfile @@ -11,16 +11,23 @@ RUN a2enmod rewrite RUN set -xe \ && apt-get update \ - && apt-get install -y aspell \ - clamav \ + && apt-get install -y clamav \ graphviz \ - libpng12-0 \ - libpng12-dev \ + libicu52 \ + libicu-dev \ libjpeg62-turbo \ libjpeg-dev \ + libldap-2.4-2 \ + libldap2-dev \ libmcrypt4 \ libmcrypt-dev \ + libpng12-0 \ + libpng12-dev \ + libpspell-dev \ + libxml2 \ + libxml2-dev \ && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \ + && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu \ && docker-php-ext-install gd \ intl \ ldap \ @@ -31,9 +38,13 @@ RUN set -xe \ pspell \ xmlrpc \ zip \ - && apt-get remove -y libpng12-dev \ + && apt-get remove -y libicu-dev \ libjpeg-dev \ + libldap2-dev \ libmcrypt-dev \ + libpng12-dev \ + libpspell-dev \ + libxml2-dev \ && rm -rf /var/lib/apt/lists/* WORKDIR /var/www/html diff --git a/moodle/README.md b/moodle/README.md index b743dd5..b7f7b96 100644 --- a/moodle/README.md +++ b/moodle/README.md @@ -5,6 +5,8 @@ moodle administrators and learners with a single robust, secure and integrated system to create personalised learning environments. +## docker-compose.yml + ``` moodle: image: vimagick/moodle @@ -13,7 +15,7 @@ moodle: links: - mysql volumes: - - ./moodledata:/var/moodledata + - ./moodledata:/var/www/moodledata restart: always mysql: @@ -24,4 +26,13 @@ mysql: restart: always ``` +## up and running + +``` +$ cd ~/fig/moodle/ +$ mkdir -p moodledata +$ chmod 777 moodledata +$ docker-compose up -d +``` + [1]: https://moodle.org/ diff --git a/moodle/docker-compose.yml b/moodle/docker-compose.yml new file mode 100644 index 0000000..c57fcac --- /dev/null +++ b/moodle/docker-compose.yml @@ -0,0 +1,16 @@ +moodle: + image: vimagick/moodle + ports: + - "8000:80" + links: + - mysql + volumes: + - ./moodledata:/var/www/moodledata + restart: always + +mysql: + image: mysql + environment: + - MYSQL_ROOT_PASSWORD=root + - MYSQL_DATABASE=moodle + restart: always