Merge pull request #2933 from laradock/zookeeper
feat(support zookeeper extension): php-fpm workspace
This commit is contained in:
commit
9e1bce0ae9
@ -166,6 +166,7 @@ services:
|
||||
- INSTALL_LNAV=${WORKSPACE_INSTALL_LNAV}
|
||||
- INSTALL_PROTOC=${WORKSPACE_INSTALL_PROTOC}
|
||||
- INSTALL_PHPDECIMAL=${WORKSPACE_INSTALL_PHPDECIMAL}
|
||||
- INSTALL_ZOOKEEPER=${WORKSPACE_INSTALL_ZOOKEEPER}
|
||||
- PROTOC_VERSION=${WORKSPACE_PROTOC_VERSION}
|
||||
- INSTALL_DOCKER_CLIENT=${WORKSPACE_INSTALL_DOCKER_CLIENT}
|
||||
- http_proxy
|
||||
@ -263,6 +264,7 @@ services:
|
||||
- INSTALL_XHPROF=${PHP_FPM_INSTALL_XHPROF}
|
||||
- INSTALL_XMLRPC=${PHP_FPM_INSTALL_XMLRPC}
|
||||
- INSTALL_PHPDECIMAL=${PHP_FPM_INSTALL_PHPDECIMAL}
|
||||
- INSTALL_ZOOKEEPER=${PHP_FPM_INSTALL_ZOOKEEPER}
|
||||
- DOWNGRADE_OPENSSL_TLS_AND_SECLEVEL=${PHP_DOWNGRADE_OPENSSL_TLS_AND_SECLEVEL}
|
||||
- PUID=${PHP_FPM_PUID}
|
||||
- PGID=${PHP_FPM_PGID}
|
||||
|
@ -198,6 +198,7 @@ WORKSPACE_INSTALL_DOCKER_CLIENT=false
|
||||
WORKSPACE_INSTALL_LNAV=false
|
||||
WORKSPACE_INSTALL_PROTOC=false
|
||||
WORKSPACE_INSTALL_PHPDECIMAL=false
|
||||
WORKSPACE_INSTALL_ZOOKEEPER=false
|
||||
WORKSPACE_PROTOC_VERSION=latest
|
||||
|
||||
### PHP_FPM ###############################################
|
||||
@ -258,6 +259,7 @@ PHP_FPM_INSTALL_SSHPASS=false
|
||||
PHP_FPM_INSTALL_MAILPARSE=false
|
||||
PHP_FPM_INSTALL_WKHTMLTOPDF=false
|
||||
PHP_FPM_INSTALL_PHPDECIMAL=false
|
||||
PHP_FPM_INSTALL_ZOOKEEPER=false
|
||||
PHP_FPM_FFMPEG=false
|
||||
PHP_FPM_AUDIOWAVEFORM=false
|
||||
PHP_FPM_ADDITIONAL_LOCALES="en_US.UTF-8 es_ES.UTF-8 fr_FR.UTF-8"
|
||||
|
@ -1094,6 +1094,31 @@ RUN if [ ${INSTALL_PHPDECIMAL} = true ]; then \
|
||||
;fi \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# zookeeper
|
||||
###########################################################################
|
||||
ARG INSTALL_ZOOKEEPER=false
|
||||
|
||||
RUN set -eux; \
|
||||
if [ ${INSTALL_ZOOKEEPER} = true ]; then \
|
||||
apt install -yqq libzookeeper-mt-dev; \
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
|
||||
curl -L -o /tmp/php-zookeeper.tar.gz https://github.com/php-zookeeper/php-zookeeper/archive/master.tar.gz; \
|
||||
mkdir -p /tmp/php-zookeeper; \
|
||||
tar -C /tmp/php-zookeeper -zxvf /tmp/php-zookeeper.tar.gz --strip 1; \
|
||||
cd /tmp/php-zookeeper; \
|
||||
phpize && ./configure && make && make install;\
|
||||
else \
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||
pecl install zookeeper-0.5.0; \
|
||||
else \
|
||||
pecl install zookeeper-0.7.2; \
|
||||
fi; \
|
||||
fi; \
|
||||
docker-php-ext-enable zookeeper; \
|
||||
php -m | grep -q 'zookeeper'; \
|
||||
fi
|
||||
|
||||
###########################################################################
|
||||
# New Relic for PHP:
|
||||
###########################################################################
|
||||
|
@ -1600,6 +1600,32 @@ RUN if [ ${INSTALL_PHPDECIMAL} = true ]; then \
|
||||
;fi \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# zookeeper
|
||||
###########################################################################
|
||||
ARG INSTALL_ZOOKEEPER=false
|
||||
|
||||
RUN set -eux; \
|
||||
if [ ${INSTALL_ZOOKEEPER} = true ]; then \
|
||||
apt install -yqq libzookeeper-mt-dev; \
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
|
||||
curl -L -o /tmp/php-zookeeper.tar.gz https://github.com/php-zookeeper/php-zookeeper/archive/master.tar.gz; \
|
||||
mkdir -p /tmp/php-zookeeper; \
|
||||
tar -C /tmp/php-zookeeper -zxvf /tmp/php-zookeeper.tar.gz --strip 1; \
|
||||
cd /tmp/php-zookeeper; \
|
||||
phpize && ./configure && make && make install;\
|
||||
else \
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||
pecl install zookeeper-0.5.0; \
|
||||
else \
|
||||
pecl install zookeeper-0.7.2; \
|
||||
fi; \
|
||||
fi; \
|
||||
echo "extension=zookeeper.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/zookeeper.ini; \
|
||||
ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/zookeeper.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-zookeeper.ini; \
|
||||
php -m | grep -q 'zookeeper'; \
|
||||
fi
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Final Touch
|
||||
|
Loading…
Reference in New Issue
Block a user