-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
87 lines (78 loc) · 2.42 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
FROM php:7.3.10-apache-stretch
LABEL maintainer "Linky <[email protected]>"
# Use the default production configuration
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
# Install Moodle dependencies:
RUN apt-get update && \
apt-get install -y \
libicu-dev \
openssl \
libcurl4-openssl-dev \
libssl-dev \
libxml2-dev \
libzip-dev \
zlib1g-dev \
libpng-dev \
libjpeg-dev \
libfreetype6-dev \
zip \
graphviz \
libpspell-dev \
aspell \
ghostscript \
libldb-dev \
libldap2-dev
RUN docker-php-ext-configure intl && \
docker-php-ext-install intl
RUN docker-php-ext-configure zip && \
docker-php-ext-install mysqli && \
docker-php-ext-install soap && \
docker-php-ext-install zip && \
docker-php-ext-install xml && \
docker-php-ext-install xmlrpc && \
docker-php-ext-install curl && \
docker-php-ext-install pspell && \
docker-php-ext-install mbstring && \
docker-php-ext-install ldap
RUN docker-php-ext-configure gd \
--with-freetype-dir=/usr/include/ \
--with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd
# Op cache for speed up php processing:
RUN docker-php-ext-configure opcache --enable-opcache \
&& docker-php-ext-install opcache
# Redis extension for cache storage:
RUN pecl install -o -f redis \
&& rm -rf /tmp/pear \
&& echo "extension=redis.so" > /usr/local/etc/php/conf.d/redis.ini
ENV DATABASE_TYPE="mysqli" \
MYSQL_DATABASE="project" \
MYSQL_USER="project" \
MYSQL_PASSWORD="project" \
MYSQL_HOST="mysqldb" \
MYSQL_PORT="3306" \
MYSQL_PREFIX="mdl_" \
HTTP_HOST="127.0.0.1:80" \
MOODLE_DATA_DIR="/var/moodledata" \
MOODLE_THEME_DIR="/var/moodle-themes" \
MOODLE_EMAIL="[email protected]" \
MOODLE_LANGUAGE="en" \
MOODLE_PASSWORD="password" \
MOODLE_SITENAME="New Site" \
MOODLE_SKIP_INSTALL="no" \
MOODLE_USERNAME="user" \
MOODLE_SUMMARY="" \
MYSQL_CLIENT_CREATE_DATABASE_NAME="" \
MYSQL_CLIENT_CREATE_DATABASE_PASSWORD="" \
MYSQL_CLIENT_CREATE_DATABASE_PRIVILEGES="ALL" \
MYSQL_CLIENT_CREATE_DATABASE_USER="" \
SMTP_HOST="" \
SMTP_PASSWORD="" \
SMTP_PORT="" \
SMTP_PROTOCOL="" \
SMTP_USER=""
COPY configs/php/* $PHP_INI_DIR/conf.d/
COPY configs/apache-sites-avaible/* /etc/apache2/sites-available/
COPY scripts /scripts
RUN chmod +x /scripts/*
ENTRYPOINT ["/scripts/entrypoint.sh"]