-
Notifications
You must be signed in to change notification settings - Fork 34
/
Dockerfile
58 lines (50 loc) · 1.86 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
54
55
56
57
ARG ARCH=
FROM ${ARCH}erseco/alpine-php-webserver:latest
LABEL maintainer="Ernesto Serrano <[email protected]>"
USER root
COPY --chown=nobody rootfs/ /
# crond needs root, so install dcron and cap package and set the capabilities
# on dcron binary https://github.com/inter169/systs/blob/master/alpine/crond/README.md
RUN apk add --no-cache dcron libcap php84-exif php84-pecl-redis php84-pecl-igbinary php84-ldap && \
chown nobody:nobody /usr/sbin/crond && \
setcap cap_setgid=ep /usr/sbin/crond
# add a quick-and-dirty hack to fix https://github.com/erseco/alpine-moodle/issues/26
RUN apk add gnu-libiconv=1.15-r3 --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.13/community/ --allow-untrusted
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so
USER nobody
# Change MOODLE_XX_STABLE for new versions
ENV MOODLE_URL=https://github.com/moodle/moodle/archive/MOODLE_405_STABLE.tar.gz \
LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
SITE_URL=http://localhost \
DB_TYPE=pgsql \
DB_HOST=postgres \
DB_PORT=5432 \
DB_NAME=moodle \
DB_USER=moodle \
DB_PASS=moodle \
DB_PREFIX=mdl_ \
DB_DBHANDLEOPTIONS=false \
REDIS_HOST= \
REVERSEPROXY=false \
SSLPROXY=false \
MY_CERTIFICATES=none \
MOODLE_LANGUAGE=en \
MOODLE_SITENAME=Dockerized_Moodle \
MOODLE_USERNAME=moodleuser \
MOODLE_PASSWORD=PLEASE_CHANGEME \
SMTP_HOST=smtp.gmail.com \
SMTP_PORT=587 \
SMTP_PASSWORD=your_password \
SMTP_PROTOCOL=tls \
MOODLE_MAIL_NOREPLY_ADDRESS=noreply@localhost \
MOODLE_MAIL_PREFIX=[moodle] \
AUTO_UPDATE_MOODLE=true \
DEBUG=false \
client_max_body_size=50M \
post_max_size=50M \
upload_max_filesize=50M \
max_input_vars=5000
RUN curl --location $MOODLE_URL | tar xz --strip-components=1 -C /var/www/html/