Add configuration to install aerospike php extension

This commit is contained in:
Luciano Gonçalves
2016-08-20 18:57:01 +01:00
parent 9bd70aadc8
commit 1afad7f14c
5 changed files with 56 additions and 2 deletions

View File

@ -98,6 +98,28 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
&& docker-php-ext-enable memcached \
;fi
#####################################
# PHP Aerospike:
#####################################
ARG INSTALL_AEROSPIKE_EXTENSION=true
ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION}
# Copy aerospike configration for remote debugging
COPY ./aerospike.ini /usr/local/etc/php/conf.d/aerospike.ini
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \
# Install the php aerospike extension
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/luciano-jr/aerospike-client-php/archive/master.tar.gz" \
&& mkdir -p aerospike-client-php \
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
&& ( \
cd aerospike-client-php/src/aerospike \
&& phpize \
&& ./build.sh \
&& make install \
) \
&& rm /tmp/aerospike-client-php.tar.gz \
;fi
#####################################
# Opcache:
#####################################
@ -127,4 +149,4 @@ WORKDIR /var/www/laravel
CMD ["php-fpm"]
EXPOSE 9000
EXPOSE 9000

3
php-fpm/aerospike.ini Normal file
View File

@ -0,0 +1,3 @@
extension=aerospike.so
aerospike.udf.lua_system_path=/usr/local/aerospike/lua
aerospike.udf.lua_user_path=/usr/local/aerospike/usr-lua