update nginx-php

This commit is contained in:
Wonderfall 2017-04-29 01:13:38 +02:00
parent 19ef7b2f57
commit eb01bac57e
2 changed files with 40 additions and 21 deletions

View File

@ -3,6 +3,10 @@ FROM alpine:3.5
ARG BUILD_CORES ARG BUILD_CORES
ARG NGINX_VER=1.13.0 ARG NGINX_VER=1.13.0
ARG PHP_VER=7.1.4
ARG LIBICONV_VERSION=1.15
ARG PHP_MIRROR=http://ch1.php.net
ARG NGINX_CONF=" \ ARG NGINX_CONF=" \
--prefix=/nginx \ --prefix=/nginx \
@ -20,15 +24,20 @@ ARG NGINX_CONF=" \
--without-http_empty_gif_module \ --without-http_empty_gif_module \
--without-http_browser_module" --without-http_browser_module"
ARG PHP_VER=7.1.4
ARG PHP_MIRROR=http://ch1.php.net
ARG LIBICONV_VERSION=1.15
ARG PHP_CONF=" \ ARG PHP_CONF=" \
--prefix=/usr \
--libdir=/usr/lib/php \
--datadir=/usr/share/php \
--sysconfdir=/php/etc \
--localstatedir=/php/var \
--with-pear=/usr/share/php \
--with-config-file-scan-dir=/php/conf.d \
--with-config-file-path=/php \
--with-pic \
--disable-short-tags \
--without-readline \
--enable-bcmath=shared \
--enable-fpm \ --enable-fpm \
--with-config-file-path="/php" \
--with-config-file-scan-dir="/php/conf.d" \
--disable-cgi \ --disable-cgi \
--enable-mysqlnd \ --enable-mysqlnd \
--enable-mbstring \ --enable-mbstring \
@ -36,10 +45,17 @@ ARG PHP_CONF=" \
--with-libedit \ --with-libedit \
--with-openssl \ --with-openssl \
--with-iconv=/usr/local \ --with-iconv=/usr/local \
--with-gd \
--with-jpeg-dir \
--with-png-dir \
--with-webp-dir \
--with-xpm-dir=no \
--with-freetype-dir \
--enable-gd-native-ttf \
--disable-gd-jis-conv \
--with-zlib" --with-zlib"
ARG PHP_EXT_LIST=" \ ARG PHP_EXT_LIST=" \
gd \
mysqli \ mysqli \
ctype \ ctype \
dom \ dom \
@ -74,7 +90,16 @@ ARG CUSTOM_BUILD_PKGS=" \
gmp-dev \ gmp-dev \
libmcrypt-dev \ libmcrypt-dev \
icu-dev \ icu-dev \
postgresql-dev" postgresql-dev \
libpng-dev \
libwebp-dev \
gd-dev \
libjpeg-turbo-dev \
libxpm-dev \
libedit-dev \
libxml2-dev \
libressl-dev \
sqlite-dev"
ARG CUSTOM_PKGS=" \ ARG CUSTOM_PKGS=" \
freetype \ freetype \
@ -85,9 +110,6 @@ ARG CUSTOM_PKGS=" \
icu \ icu \
libpq" libpq"
ENV MEMORY_LIMIT=512M \
UPLOAD_MAX_SIZE=1G
COPY rootfs / COPY rootfs /
RUN NB_CORES=${BUILD_CORES-$(getconf _NPROCESSORS_CONF)} \ RUN NB_CORES=${BUILD_CORES-$(getconf _NPROCESSORS_CONF)} \
@ -108,10 +130,6 @@ RUN NB_CORES=${BUILD_CORES-$(getconf _NPROCESSORS_CONF)} \
make \ make \
pkgconf \ pkgconf \
curl-dev \ curl-dev \
libedit-dev \
libxml2-dev \
libressl-dev \
sqlite-dev \
ca-certificates \ ca-certificates \
${CUSTOM_BUILD_PKGS}" \ ${CUSTOM_BUILD_PKGS}" \
&& apk -U add \ && apk -U add \
@ -122,10 +140,10 @@ RUN NB_CORES=${BUILD_CORES-$(getconf _NPROCESSORS_CONF)} \
libedit \ libedit \
libxml2 \ libxml2 \
libressl \ libressl \
libwebp \
gd \
pcre \ pcre \
zlib \ zlib \
s6 \
su-exec \
${CUSTOM_PKGS} \ ${CUSTOM_PKGS} \
### Source downloading ### Source downloading
@ -154,7 +172,7 @@ RUN NB_CORES=${BUILD_CORES-$(getconf _NPROCESSORS_CONF)} \
### PHP installation ### PHP installation
&& mv /usr/src/php-${PHP_VER} /usr/src/php \ && mv /usr/src/php-${PHP_VER} /usr/src/php \
&& cd /usr/src/php \ && cd /usr/src/php \
&& ./configure ${PHP_CONF} \ && ./configure CFLAGS="-O3 -fstack-protector-strong" ${PHP_CONF} \
&& make -j ${NB_CORES} \ && make -j ${NB_CORES} \
&& make install \ && make install \

View File

@ -10,6 +10,7 @@ pm.start_servers = 2
pm.min_spare_servers = 1 pm.min_spare_servers = 1
pm.max_spare_servers = 6 pm.max_spare_servers = 6
chdir = / chdir = /
request_terminate_timeout = 0
env[PATH] = /usr/local/bin:/usr/bin:/bin env[PATH] = /usr/local/bin:/usr/bin:/bin
php_admin_value[post_max_size] = <UPLOAD_MAX_SIZE> php_admin_value[post_max_size] = <UPLOAD_MAX_SIZE>
php_admin_value[upload_max_filesize] = <UPLOAD_MAX_SIZE> php_admin_value[upload_max_filesize] = <UPLOAD_MAX_SIZE>
@ -17,4 +18,4 @@ php_admin_value[max_execution_time] = 10800
php_admin_value[max_input_time] = 3600 php_admin_value[max_input_time] = 3600
php_admin_value[expose_php] = Off php_admin_value[expose_php] = Off
php_admin_value[memory_limit] = <MEMORY_LIMIT> php_admin_value[memory_limit] = <MEMORY_LIMIT>
include=/php/php-fpm.d/*.conf php_admin_value[session.save_path] = "/data/session"