Dockerfile 2.37 KB
Newer Older
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
1
FROM php:7.2.25-alpine
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
2 3 4 5
MAINTAINER Ludwig Ruderstaller "l.ruderstaller@cwd.at"

ENV COMPOSER_ALLOW_SUPERUSER=1 \
    COMPOSER_DISABLE_XDEBUG_WARN=1 \
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
6
    PHPREDIS_VERSION=5.1.1 
Ludwig Ruderstaller's avatar
latest  
Ludwig Ruderstaller committed
7
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php
Ludwig Ruderstaller's avatar
testing  
Ludwig Ruderstaller committed
8

Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
9
RUN set -xe \
10
 && apk add --no-cache --virtual .build-deps \            
11
            tzdata \
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
12
	    $PHPIZE_DEPS \
13
 && apk add gnu-libiconv --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ --allow-untrusted \
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
14 15 16 17
 && cp /usr/share/zoneinfo/UTC /etc/localtime \
 && echo 'UTC' > /etc/localtime \

 && apk add --no-cache \
18
	openssl-dev \
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
19 20 21 22 23 24
        bash \
        freetype-dev \
        libpng-dev \
        libjpeg-turbo-dev \
        sqlite-dev \
        curl \
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
25
	curl-dev \
26
        libsodium-dev \
27
        icu-dev \
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
28 29 30 31 32 33
        libxml2-dev \
        recode-dev \
        libxslt-dev \
        git \
        postgresql-client \
        postgresql-dev \
34
        openssh-client \
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
35
             && apk --update --no-cache add grep \
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
36 37 38 39
 && mkdir -p /usr/src/php/ext/redis \
 && curl -L https://github.com/phpredis/phpredis/archive/$PHPREDIS_VERSION.tar.gz | tar xvz -C /usr/src/php/ext/redis --strip 1 \
 && echo 'redis' >> /usr/src/php-available-exts \

Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
40
  && docker-php-ext-configure gd \
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
41 42 43
      --with-freetype-dir=/usr/include/ \
      --with-png-dir=/usr/include/ \
      --with-jpeg-dir=/usr/include/ \
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
44
 
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
45 46
 && docker-php-ext-install -j$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1)\
    	gd \
Ludwig Ruderstaller's avatar
testing  
Ludwig Ruderstaller committed
47 48
        bcmath \
        opcache \
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
49 50 51 52 53 54
        iconv \
        mysqli \
        pdo \
        pdo_mysql \
        pdo_sqlite \
        pdo_pgsql \
Ludwig Ruderstaller's avatar
testing  
Ludwig Ruderstaller committed
55
        zip \
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
56 57 58 59 60
        xml \
        xsl \
        intl \
        json \
        mbstring \
61 62
                hash \
                curl \
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
63 64 65 66 67
        simplexml \
        soap \
        bcmath \
        redis \
    
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
68 69
 && docker-php-ext-install sodium \

Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
70
 && pecl install mongodb \
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
71
 && docker-php-ext-enable mongodb \
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
72
 && apk del .build-deps \
Ludwig Ruderstaller's avatar
testing  
Ludwig Ruderstaller committed
73
 && rm -rf /tmp/* /var/cache/apk/* 
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
74

Ludwig Ruderstaller's avatar
testing  
Ludwig Ruderstaller committed
75
 RUN echo "memory_limit = -1" > /usr/local/etc/php/conf.d/custom.ini \
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
76
 && echo "max_execution_time = -1" >> /usr/local/etc/php/conf.d/custom.ini \
77
 && echo "error_reporting=E_ALL" >> /usr/local/etc/php/conf.d/custom.ini \
Ludwig Ruderstaller's avatar
testing  
Ludwig Ruderstaller committed
78
 && echo "log_errors=On" >> /usr/local/etc/php/conf.d/custom.ini
79

Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
80 81
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN composer global require hirak/prestissimo --no-plugins --no-scripts
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
82 83 84