forked from jmhardison/docker-moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (29 loc) · 1.51 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
# Docker-Moodle
# Dockerfile for Moodle development, testing, and upgrading in your localhost.
# Forked from jhardison's docker version. https://www.github.com/jmhardison/docker-moodle
FROM ubuntu:20.04
LABEL maintainer="Damian Mantuano <smarbos@gmail.com>"
VOLUME ["/var/moodledata"]
EXPOSE 80 443
# Let the container know that there is no tty
ENV DEBIAN_FRONTEND noninteractive
# Database info and other connection information derrived from env variables. See readme.
# Set ENV Variables externally Moodle_URL should be overridden.
ENV MOODLE_URL http://127.0.0.1
# Enable when using external SSL reverse proxy
# Default: false
ENV SSL_PROXY false
COPY ./foreground.sh /etc/apache2/foreground.sh
RUN apt-get update && apt-get upgrade -y && \
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 libcurl4 \
libcurl3-dev php-curl php-xmlrpc php-intl php-mysql git-core php-xml php-mbstring php-zip php-soap cron php-ldap && \
chmod +x /etc/apache2/foreground.sh
#cron
COPY moodlecron /etc/cron.d/moodlecron
RUN chmod 0644 /etc/cron.d/moodlecron
# Enable SSL, moodle requires it
RUN a2enmod ssl && a2ensite default-ssl #if using proxy dont need actually secure connection
# Cleanup, this is ran to reduce the resulting size of the image.
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/*
ENTRYPOINT ["/etc/apache2/foreground.sh"]