Merge pull request #1582 from bestlong/php5-fpm-aerospike-build-faile

php-fpm aerospike support php5
This commit is contained in:
Shao Yu-Lung (Allen) 2018-06-01 11:20:49 +08:00 committed by GitHub
commit ba1a83b40b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -267,15 +267,29 @@ RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
# Fix dependencies for PHPUnit within aerospike extension # Fix dependencies for PHPUnit within aerospike extension
apt-get -y install sudo wget && \ apt-get -y install sudo wget && \
# Install the php aerospike extension # Install the php aerospike extension
curl -L -o /tmp/aerospike-client-php.tar.gz ${AEROSPIKE_PHP_REPOSITORY} \ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
curl -L -o /tmp/aerospike-client-php.tar.gz https://github.com/aerospike/aerospike-client-php5/archive/master.tar.gz; \
else \
curl -L -o /tmp/aerospike-client-php.tar.gz ${AEROSPIKE_PHP_REPOSITORY}; \
fi \
&& mkdir -p aerospike-client-php \ && mkdir -p aerospike-client-php \
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \ && tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
&& ( \ && \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
( \
cd aerospike-client-php/src/aerospike \
&& phpize \
&& ./build.sh \
&& make install \
) \
else \
( \
cd aerospike-client-php/src \ cd aerospike-client-php/src \
&& phpize \ && phpize \
&& ./build.sh \ && ./build.sh \
&& make install \ && make install \
) \ ) \
fi \
&& rm /tmp/aerospike-client-php.tar.gz \ && rm /tmp/aerospike-client-php.tar.gz \
&& docker-php-ext-enable aerospike \ && docker-php-ext-enable aerospike \
;fi ;fi