-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
53 lines (43 loc) · 1.89 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Dockerfile for moodle instance. more dockerish version of https://github.com/sergiogomez/docker-moodle
# Forked from Jon Auer's docker version. https://github.com/jda/docker-moodle
FROM ubuntu:16.04
MAINTAINER Tom Arild Jakobsen <[email protected]>
# MAINTAINER Jonathan Hardison <[email protected]>
#Original Maintainer Jon Auer <[email protected]>
VOLUME ["/var/moodledata"]
EXPOSE 80 443
COPY moodle-config.php /var/www/html/config.php
# Keep upstart from complaining
# RUN dpkg-divert --local --rename --add /sbin/initctl
# RUN ln -sf /bin/true /sbin/initctl
# Let the container know that there is no tty
ENV DEBIAN_FRONTEND noninteractive
# Database info
#ENV MYSQL_HOST 127.0.0.1
#ENV MYSQL_USER moodle
#ENV MYSQL_PASSWORD moodle
#ENV MYSQL_DB moodle
ENV MOODLE_URL http://localhost:8080
ADD ./foreground.sh /etc/apache2/foreground.sh
RUN apt-get update && \
apt-get -y install mysql-client pwgen python-setuptools curl git unzip apache2 php \
php-gd libapache2-mod-php postfix wget supervisor php-pgsql curl libcurl3 \
libcurl3-dev php-curl php-xmlrpc php-intl php-mysql git-core php-xml php-mbstring php-zip php-soap && \
cd /tmp && \
git clone -b master git://git.moodle.org/moodle.git --single-branch --depth=1 && \
mv /tmp/moodle/* /var/www/html/ && \
rm /var/www/html/index.html && \
chown -R www-data:www-data /var/www/html && \
chmod +x /etc/apache2/foreground.sh
# Enable SSL, moodle requires it
RUN a2enmod ssl && a2ensite default-ssl # if using proxy, don't need actually secure connection
# Cleanup
RUN apt-get clean autoclean && apt-get autoremove -y && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/lib/dpkg/* /var/lib/cache/* /var/lib/log/*
CMD ["/etc/apache2/foreground.sh"]
#RUN easy_install supervisor
#ADD ./start.sh /start.sh
#
#ADD ./supervisord.conf /etc/supervisord.conf
# RUN chmod 755 /start.sh /etc/apache2/foreground.sh
# EXPOSE 22 80
# CMD ["/bin/bash", "/start.sh"]