PHP 8 and opcache enabled for all PHPs
This commit is contained in:
parent
649e1a691a
commit
d7cbfe9db1
@ -70,6 +70,11 @@ RUN build_php.sh 7.4.9
|
||||
# 2021/02
|
||||
RUN build_php.sh 7.4.15
|
||||
|
||||
## PHP 8
|
||||
|
||||
# 2021/02
|
||||
RUN build_php8.sh 8.0.3
|
||||
|
||||
## Ruby
|
||||
WORKDIR /usr/src
|
||||
ADD build_ruby.sh /usr/local/bin/build_ruby.sh
|
||||
|
@ -69,7 +69,6 @@ make -j
|
||||
make install
|
||||
|
||||
mkdir -p /opt/techs/php-$VERSION/etc/conf.d/
|
||||
ln -s /srv/conf/php-fpm/php.ini /opt/techs/php-$VERSION/etc/conf.d/app.ini
|
||||
|
||||
cd /opt/techs/php-$VERSION/bin
|
||||
curl -s https://getcomposer.org/installer | ./php -d allow_url_fopen=On
|
||||
@ -78,5 +77,6 @@ cd -
|
||||
echo "no" | /opt/techs/php-$VERSION/bin/pecl install redis
|
||||
echo "no" | /opt/techs/php-$VERSION/bin/pecl install imagick
|
||||
|
||||
echo "extension=redis.so" > /opt/techs/php-$VERSION/etc/conf.d/extensions.ini
|
||||
echo "zend_extension=opcache.so" > /opt/techs/php-$VERSION/etc/conf.d/extensions.ini
|
||||
echo "extension=redis.so" >> /opt/techs/php-$VERSION/etc/conf.d/extensions.ini
|
||||
echo "extension=imagick.so" >> /opt/techs/php-$VERSION/etc/conf.d/extensions.ini
|
||||
|
77
build_php8.sh
Executable file
77
build_php8.sh
Executable file
@ -0,0 +1,77 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
VERSION=$1
|
||||
|
||||
mkdir -p /opt/techs
|
||||
|
||||
cd /usr/src
|
||||
|
||||
wget https://www.php.net/distributions/php-$VERSION.tar.bz2
|
||||
tar xf php-$VERSION.tar.bz2
|
||||
rm php-$VERSION.tar.bz2
|
||||
|
||||
# test -e /usr/lib/x86_64-linux-gnu/libc-client.a || ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a
|
||||
|
||||
cd php-$VERSION
|
||||
./configure --enable-fpm --with-mysqli --prefix=/opt/techs/php-$VERSION \
|
||||
--with-config-file-path=/opt/techs/php-$VERSION/etc \
|
||||
--with-config-file-scan-dir=/opt/techs/php-$VERSION/etc/conf.d/ \
|
||||
--sbindir=/opt/techs/php-$VERSION/bin \
|
||||
--with-pdo-pgsql \
|
||||
--with-zlib-dir \
|
||||
--with-freetype \
|
||||
--enable-mbstring \
|
||||
--enable-soap \
|
||||
--enable-calendar \
|
||||
--with-curl \
|
||||
--with-zlib \
|
||||
--enable-gd \
|
||||
--with-zip \
|
||||
--with-pgsql \
|
||||
--disable-rpath \
|
||||
--with-bz2 \
|
||||
--with-zlib \
|
||||
--enable-sockets \
|
||||
--enable-sysvsem \
|
||||
--enable-sysvshm \
|
||||
--enable-pcntl \
|
||||
--enable-mbregex \
|
||||
--enable-exif \
|
||||
--enable-bcmath \
|
||||
--with-mhash \
|
||||
--with-pdo-mysql \
|
||||
--with-jpeg \
|
||||
--with-openssl \
|
||||
--with-fpm-user=app\
|
||||
--with-fpm-group=app\
|
||||
--with-libdir=/lib/x86_64-linux-gnu \
|
||||
--enable-ftp \
|
||||
--with-gettext \
|
||||
--with-xsl \
|
||||
--enable-opcache \
|
||||
--with-imap \
|
||||
--with-imap-ssl \
|
||||
--with-sodium \
|
||||
--with-kerberos \
|
||||
--with-pear
|
||||
make -j
|
||||
make install
|
||||
|
||||
mkdir -p /opt/techs/php-$VERSION/etc/conf.d/
|
||||
ln -s /srv/conf/php-fpm/php.ini /opt/techs/php-$VERSION/etc/conf.d/app.ini
|
||||
|
||||
cd /opt/techs/php-$VERSION/bin
|
||||
curl -s https://getcomposer.org/installer | ./php -d allow_url_fopen=On
|
||||
cd -
|
||||
|
||||
echo "no" | /opt/techs/php-$VERSION/bin/pecl install redis
|
||||
echo "no" | /opt/techs/php-$VERSION/bin/pecl install imagick
|
||||
|
||||
|
||||
echo "zend_extension=opcache.so" > /opt/techs/php-$VERSION/etc/conf.d/extensions.ini
|
||||
echo "extension=redis.so" >> /opt/techs/php-$VERSION/etc/conf.d/extensions.ini
|
||||
# Not supported yet
|
||||
# https://github.com/Imagick/imagick/issues/358
|
||||
# echo "extension=imagick.so" >> /opt/techs/php-$VERSION/etc/conf.d/extensions.ini
|
@ -8,3 +8,11 @@ allow_url_fopen = Off
|
||||
display_errors = On
|
||||
date.timezone = "Europe/Prague"
|
||||
catch_workers_output = On
|
||||
|
||||
opcache.memory_consumption=128
|
||||
opcache.interned_strings_buffer=8
|
||||
opcache.max_accelerated_files=4000
|
||||
opcache.revalidate_freq=60
|
||||
opcache.fast_shutdown=1
|
||||
opcache.enable_cli=1
|
||||
opcache.enable = 1
|
||||
|
@ -12,6 +12,9 @@ for line in (cat Dockerfile | grep "RUN build_")
|
||||
case "build_php.sh"
|
||||
set TECH php
|
||||
set TECH_VERBOSE PHP
|
||||
case "build_php8.sh"
|
||||
set TECH php
|
||||
set TECH_VERBOSE PHP
|
||||
case "build_python.sh"
|
||||
set TECH python
|
||||
set TECH_VERBOSE Python
|
||||
|
Loading…
Reference in New Issue
Block a user