-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.gallery
42 lines (33 loc) · 1.64 KB
/
Dockerfile.gallery
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
FROM php:7.0-apache
#FROM php:5.6-apache
ARG INSTALL_PHPUNIT=
ARG INSTALL_XDEBUG=
ARG INSTALL_NODE=
RUN a2enmod rewrite \
&& a2enmod expires
# Install Imagick
RUN apt-get update -o Acquire::ForceIPv4=true \
&& apt-get install -y libmagickwand-dev wget \
&& pecl install imagick \
&& rm -rf /var/lib/apt/lists/* \
&& echo 'extension=imagick.so' > /usr/local/etc/php/conf.d/ext-imagick.ini
# Install PHPUnit if configured
RUN if [ -n "${INSTALL_PHPUNIT}" ]; then yes | wget https://phar.phpunit.de/phpunit.phar \
&& chmod +x phpunit.phar \
&& mv phpunit.phar /usr/local/bin/phpunit; fi
# Install XDebug if configured
# Make sure to change edit "remote_host" if debugging from non-Windows host
RUN if [ -n "${INSTALL_XDEBUG}" ]; then yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_host=docker.for.win.localhost" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_port=9000" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_autostart=1" >> /usr/local/etc/php/conf.d/xdebug.ini; fi
# Install NodeJS/NPM, if configured
RUN if [ -n "${INSTALL_NODE}" ]; then yes | curl -sL https://deb.nodesource.com/setup_6.x | bash - \
&& apt-get install -y nodejs; fi
# Set time zone to UTC
RUN echo "date.timezone = \"Etc/UTC\"" > /usr/local/etc/php/conf.d/timezone.ini \
&& echo "Etc/UTC" > /etc/timezone
# RUN sed -i "s/LogLevel warn/LogLevel debug/g" /etc/apache2/apache2.conf
WORKDIR /var/www/html