Skip to content

Commit 34ad8ac

Browse files
committed
php-fpm aerospike support php5
1 parent 5677564 commit 34ad8ac

1 file changed

Lines changed: 21 additions & 7 deletions

File tree

php-fpm/Dockerfile

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -267,15 +267,29 @@ RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
267267
# Fix dependencies for PHPUnit within aerospike extension
268268
apt-get -y install sudo wget && \
269269
# Install the php aerospike extension
270-
curl -L -o /tmp/aerospike-client-php.tar.gz ${AEROSPIKE_PHP_REPOSITORY} \
270+
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
271+
curl -L -o /tmp/aerospike-client-php.tar.gz https://github.com/aerospike/aerospike-client-php5/archive/master.tar.gz; \
272+
else \
273+
curl -L -o /tmp/aerospike-client-php.tar.gz ${AEROSPIKE_PHP_REPOSITORY}; \
274+
fi \
271275
&& mkdir -p aerospike-client-php \
272276
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
273-
&& ( \
274-
cd aerospike-client-php/src \
275-
&& phpize \
276-
&& ./build.sh \
277-
&& make install \
278-
) \
277+
&& \
278+
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
279+
( \
280+
cd aerospike-client-php/src/aerospike \
281+
&& phpize \
282+
&& ./build.sh \
283+
&& make install \
284+
) \
285+
else \
286+
( \
287+
cd aerospike-client-php/src \
288+
&& phpize \
289+
&& ./build.sh \
290+
&& make install \
291+
) \
292+
fi \
279293
&& rm /tmp/aerospike-client-php.tar.gz \
280294
&& docker-php-ext-enable aerospike \
281295
;fi

0 commit comments

Comments
 (0)