forked from MiLk/docker-php-xdebug
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
43 lines (30 loc) · 2.09 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
FROM php:7.2-apache
LABEL maintainer "Matyas Kroupa <kroupa.matyas@gmail.com>"
RUN apt-get update && apt-get install -y git libpq-dev libmcrypt-dev zlib1g-dev libicu-dev libzip-dev g++ graphviz && rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install pdo_pgsql pdo_mysql mysqli mbstring zip sockets intl bcmath
RUN curl -o /usr/local/bin/composer https://getcomposer.org/composer.phar && \
chmod +x /usr/local/bin/composer
RUN pecl install xdebug-stable
RUN pecl install apcu-stable
RUN echo "zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20170718/xdebug.so" > /usr/local/etc/php/conf.d/xdebug.ini && \
echo "xdebug.default_enable = 1" >> /usr/local/etc/php/conf.d/xdebug.ini && \
echo "xdebug.remote_enable = 1" >> /usr/local/etc/php/conf.d/xdebug.ini && \
echo "xdebug.remote_handler = dbgp" >> /usr/local/etc/php/conf.d/xdebug.ini && \
echo "xdebug.remote_autostart = 0" >> /usr/local/etc/php/conf.d/xdebug.ini && \
echo "xdebug.remote_connect_back = 1" >> /usr/local/etc/php/conf.d/xdebug.ini && \
echo "xdebug.remote_port = 9000" >> /usr/local/etc/php/conf.d/xdebug.ini && \
echo "xdebug.remote_host = 172.17.42.1" >> /usr/local/etc/php/conf.d/xdebug.ini && \
echo "xdebug.profiler_enable=0" >> /usr/local/etc/php/conf.d/xdebug.ini && \
echo "xdebug.profiler_enable_trigger=1" >> /usr/local/etc/php/conf.d/xdebug.ini && \
echo "xdebug.profiler_output_dir=\"/tmp\"" >> /usr/local/etc/php/conf.d/xdebug.ini
RUN echo "zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20170718/opcache.so" > /usr/local/etc/php/conf.d/opcache.ini
RUN echo "extension=apcu.so" > /usr/local/etc/php/conf.d/apcu.ini && \
echo "apc.enable_cli=1" >> /usr/local/etc/php/conf.d/apcu.ini
RUN echo "realpath_cache_size=4096k" > /usr/local/etc/php/conf.d/tuning.ini && \
echo "realpath_cache_ttl=300" >> /usr/local/etc/php/conf.d/tuning.ini
RUN echo "date.timezone = \"UTC\"" >> /usr/local/etc/php/conf.d/timezone.ini
RUN a2enmod rewrite
RUN mkdir /var/www/html/log; \
mkdir -p /var/www/html/temp/cache; \
chmod 777 -R /var/www/html/log /var/www/html/temp
EXPOSE 80