-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
34 lines (27 loc) · 1.35 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
FROM bitnami/moodle:latest
# Configure PHP error_log to stderr, as in: https://docs.docker.com/config/containers/logging/
RUN echo "error_log = /dev/stderr" > /opt/bitnami/php/etc/conf.d/error_log.ini
# Prepare /var/local/cache
RUN mkdir -vp /var/local/cache && \
chown -Rc bitnami:daemon /var/local/cache && \
chmod ug+rwx /var/local/cache
# Enable opcache
# not working: https://github.com/bitnami/bitnami-docker-moodle/issues/100#issuecomment-527069683
#RUN sed -i 's/opcache.enable = Off/opcache.enable = 1/I' /opt/bitnami/php/etc/php.ini
RUN echo "opcache.enable = 1" > /opt/bitnami/php/etc/conf.d/opcache.ini
# Prepare PECL build tools
RUN apt-get update && \
apt-get install -y gcc make autoconf libc-dev libssl-dev pkg-config
# Install PECL igbinary
# igbinary serializer & lzf compression is recommended: https://pdfs.semanticscholar.org/8395/e04cf62d03597e2a2e6a605ebc52bfa6ca7d.pdf
RUN pecl channel-update pecl.php.net && \
pecl install igbinary
RUN echo "extension=igbinary.so" > /opt/bitnami/php/etc/conf.d/igbinary.ini
# Install PECL redis
RUN pecl channel-update pecl.php.net
RUN yes | pecl install redis
RUN echo "extension=redis.so" > /opt/bitnami/php/etc/conf.d/redis.ini
# Install PECL mongodb
RUN pecl channel-update pecl.php.net && \
pecl install mongodb
RUN echo "extension=mongodb.so" > /opt/bitnami/php/etc/conf.d/mongodb.ini