-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
118 lines (112 loc) · 5.27 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
ARG PHP_VERSION="${PHP_VERSION:-7.4.2}"
FROM php:${PHP_VERSION}-fpm-alpine3.11
LABEL maintainer="https://github.com/hermsi1337"
ARG PHPREDIS_VERSION="${PHPREDIS_VERSION:-5.1.1}"
ENV PHPREDIS_VERSION="${PHPREDIS_VERSION}"
ADD http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz /tmp/
ADD https://github.com/phpredis/phpredis/archive/${PHPREDIS_VERSION}.tar.gz /tmp/
RUN set -x && \
\
apk update && \
\
apk upgrade && \
\
docker-php-source extract && \
\
apk add --no-cache \
--virtual .build-dependencies \
$PHPIZE_DEPS \
cyrus-sasl-dev \
git \
autoconf \
g++ \
libtool \
make \
libgcrypt \
pcre-dev && \
\
apk add --no-cache \
tini \
libintl \
icu \
icu-dev \
libxml2-dev \
postgresql-dev \
freetype-dev \
libjpeg-turbo-dev \
libpng-dev \
gmp \
gmp-dev \
libmemcached-dev \
imagemagick-dev \
libzip-dev \
zlib-dev \
libssh2-dev \
libwebp-dev \
libxpm-dev \
libvpx-dev \
libxslt-dev \
libmcrypt-dev && \
tar xfz /tmp/${PHPREDIS_VERSION}.tar.gz && \
\
mv phpredis-$PHPREDIS_VERSION /usr/src/php/ext/redis && \
\
git clone https://github.com/php-memcached-dev/php-memcached.git /usr/src/php/ext/memcached/ && \
\
docker-php-ext-configure memcached && \
\
docker-php-ext-configure exif && \
\
docker-php-ext-configure gd \
--with-freetype=/usr/include/ \
--with-xpm=/usr/include/ \
--with-webp=/usr/include/ \
--with-jpeg=/usr/include/ && \
\
docker-php-ext-install -j"$(getconf _NPROCESSORS_ONLN)" \
intl \
bcmath \
xsl \
zip \
soap \
mysqli \
pdo \
pdo_mysql \
pdo_pgsql \
gmp \
redis \
iconv \
gd \
memcached && \
\
tar -xvzf \
/tmp/ioncube_loaders_lin_x86-64.tar.gz \
-C /tmp/ && \
\
mkdir -p /usr/local/php/ext/ioncube && \
\
cp -a /tmp/ioncube/ioncube_loader_lin_${PHP_VERSION%.*}.so \
/usr/local/php/ext/ioncube/ioncube_loader.so && \
\
docker-php-ext-configure opcache --enable-opcache && \
\
docker-php-ext-install opcache && \
\
docker-php-ext-install exif && \
\
pecl install \
apcu imagick && \
\
docker-php-ext-enable \
apcu imagick && \
\
apk del .build-dependencies && \
\
docker-php-source delete && \
\
rm -rf /tmp/* /var/cache/apk/*
# set recommended PHP.ini settings
# https://secure.php.net/manual/en/opcache.installation.php
# https://secure.php.net/manual/en/apcu.configuration.php
COPY ["conf.d/05-apcu-recommended.ini", "conf.d/05-opcache-recommended.ini", "conf.d/05-security-recommended.ini", "/usr/local/etc/php/conf.d/"]
CMD ["php-fpm"]