Dockerfile 2.4 KB
Newer Older
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
1
FROM php:7.1.33-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 27
        libsodium-dev \
        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 36
            libmcrypt-dev \
        libmcrypt \
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
37
             && apk --update --no-cache add grep \
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
38 39 40 41
 && 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
42
  && docker-php-ext-configure gd \
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
43 44 45
      --with-freetype-dir=/usr/include/ \
      --with-png-dir=/usr/include/ \
      --with-jpeg-dir=/usr/include/ \
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
46
 
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
47 48
 && docker-php-ext-install -j$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1)\
    	gd \
Ludwig Ruderstaller's avatar
testing  
Ludwig Ruderstaller committed
49 50
        bcmath \
        opcache \
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
51 52 53 54 55 56
        iconv \
        mysqli \
        pdo \
        pdo_mysql \
        pdo_sqlite \
        pdo_pgsql \
Ludwig Ruderstaller's avatar
testing  
Ludwig Ruderstaller committed
57
        zip \
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
58 59 60 61 62
        xml \
        xsl \
        intl \
        json \
        mbstring \
63 64
                hash \
                curl \
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
65 66 67 68 69 70
        simplexml \
        soap \
        bcmath \
        redis \
            mcrypt \
    
Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
71

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

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

Ludwig Ruderstaller's avatar
Ludwig Ruderstaller committed
82 83
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
84 85 86