1
- FROM php:7.1 -apache
1
+ FROM php:7.0 -apache
2
2
3
- RUN apt-get update
3
+ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
4
4
5
- RUN apt-get install -y g++
6
- RUN apt-get install -y --no-install-recommends apt-utils
5
+ RUN apt-get update && apt-get install -y g++ \
6
+ libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev \
7
+ libpng12-dev zlib1g-dev libpng-dev libicu-dev libcurl4-openssl-dev libxml2-dev
7
8
8
- # install extensions
9
+ RUN docker-php-ext-install mysqli mbstring zip intl mcrypt curl json
10
+ RUN docker-php-ext-install iconv xml xmlrpc
9
11
10
- RUN apt-get install -y libcurl4-openssl-dev
11
- RUN docker-php-ext-install curl
12
+ RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
13
+ && docker-php-ext-install -j$(nproc) gd
12
14
13
- RUN apt-get install -y libicu-dev
14
- RUN docker-php-ext-install intl
15
-
16
- RUN docker-php-ext-install mbstring
17
-
18
- RUN apt-get install -y libmcrypt-dev
19
- RUN docker-php-ext-install mcrypt
20
-
21
- RUN apt-get install -y libxml2-dev
22
- RUN docker-php-ext-install dom xml
23
-
24
- RUN docker-php-ext-install pdo_mysql mysqli
25
-
26
- RUN apt-get install -y libgd-dev libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
27
- RUN docker-php-ext-configure gd --with-freetype-dir=/usr
28
- RUN docker-php-ext-install gd exif
29
-
30
- # xdebug
31
- RUN pecl install xdebug \
32
- && docker-php-ext-enable xdebug \
33
- && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)\n " >> /usr/local/etc/php/conf.d/xdebug.ini \
34
- && echo "xdebug.default_enable=1\n " >> /usr/local/etc/php/conf.d/xdebug.ini \
35
- && echo "xdebug.remote_enable=1\n " >> /usr/local/etc/php/conf.d/xdebug.ini \
36
- && echo "xdebug.remote_connect_back=1\n " >> /usr/local/etc/php/conf.d/xdebug.ini \
37
- && echo "xdebug.remote_autostart=1\n " >> /usr/local/etc/php/conf.d/xdebug.ini \
38
- && echo "xdebug.remote_handler=dbgp\n " >> /usr/local/etc/php/conf.d/xdebug.ini \
39
- && echo "xdebug.remote_port=9000\n " >> /usr/local/etc/php/conf.d/xdebug.ini
15
+ RUN pecl install redis-3.1.0 \
16
+ && pecl install xdebug-2.5.0 \
17
+ && docker-php-ext-enable redis xdebug
40
18
41
19
# Enable apache modules
42
- RUN a2enmod rewrite
20
+ RUN a2enmod rewrite headers
0 commit comments