add php ssdb extension

This commit is contained in:
Larry
2021-06-12 20:49:45 +08:00
parent ef1140dc4a
commit 898434b59e
5 changed files with 90 additions and 1 deletions

View File

@ -422,6 +422,34 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
php -m | grep -r 'memcached'; \
fi
###########################################################################
# PHP SSDB:
###########################################################################
USER root
ARG INSTALL_SSDB=false
RUN set -xe; \
if [ ${INSTALL_SSDB} = true ] && [ $(php -r "echo PHP_MAJOR_VERSION;") != "8" ]; then \
apt-get -y install sudo wget && \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ]; then \
curl -L -o /tmp/ssdb-client-php.tar.gz https://github.com/jonnywang/phpssdb/archive/php7.tar.gz; \
else \
curl -L -o /tmp/ssdb-client-php.tar.gz https://github.com/jonnywang/phpssdb/archive/master.tar.gz; \
fi \
&& mkdir -p /tmp/ssdb-client-php \
&& tar -C /tmp/ssdb-client-php -zxvf /tmp/ssdb-client-php.tar.gz --strip 1 \
&& cd /tmp/ssdb-client-php \
&& phpize \
&& ./configure \
&& make \
&& make install \
&& rm /tmp/ssdb-client-php.tar.gz \
&& docker-php-ext-enable ssdb \
&& php -m | grep -r 'ssdb'; \
;fi
#
#--------------------------------------------------------------------------
# Optional Supervisord Configuration