Skip to content

Commit b0edaf9

Browse files
authored
reorganizaion aerospike extension install (laradock#2008)
1 parent 27af2bc commit b0edaf9

5 files changed

Lines changed: 18 additions & 27 deletions

File tree

docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ services:
7575
- INSTALL_WP_CLI=${WORKSPACE_INSTALL_WP_CLI}
7676
- INSTALL_DRUPAL_CONSOLE=${WORKSPACE_INSTALL_DRUPAL_CONSOLE}
7777
- INSTALL_AEROSPIKE=${WORKSPACE_INSTALL_AEROSPIKE}
78-
- AEROSPIKE_PHP_REPOSITORY=${AEROSPIKE_PHP_REPOSITORY}
7978
- INSTALL_V8JS=${WORKSPACE_INSTALL_V8JS}
8079
- COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL}
8180
- COMPOSER_REPO_PACKAGIST=${WORKSPACE_COMPOSER_REPO_PACKAGIST}
@@ -146,7 +145,6 @@ services:
146145
- INSTALL_OPCACHE=${PHP_FPM_INSTALL_OPCACHE}
147146
- INSTALL_EXIF=${PHP_FPM_INSTALL_EXIF}
148147
- INSTALL_AEROSPIKE=${PHP_FPM_INSTALL_AEROSPIKE}
149-
- AEROSPIKE_PHP_REPOSITORY=${AEROSPIKE_PHP_REPOSITORY}
150148
- INSTALL_MYSQLI=${PHP_FPM_INSTALL_MYSQLI}
151149
- INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL}
152150
- INSTALL_PG_CLIENT=${PHP_FPM_INSTALL_PG_CLIENT}

env-example

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -372,11 +372,6 @@ AEROSPIKE_FABRIC_PORT=3001
372372
AEROSPIKE_HEARTBEAT_PORT=3002
373373
AEROSPIKE_INFO_PORT=3003
374374

375-
# for all versions
376-
AEROSPIKE_PHP_REPOSITORY=https://github.com/aerospike/aerospike-client-php/archive/master.tar.gz
377-
# for php 5.6
378-
# AEROSPIKE_PHP_REPOSITORY=https://github.com/aerospike/aerospike-client-php5/archive/3.4.15.tar.gz
379-
380375
### RETHINKDB #############################################
381376

382377
RETHINKDB_PORT=8090

php-fpm/Dockerfile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ARG LARADOCK_PHP_VERSION
2424
ENV DEBIAN_FRONTEND noninteractive
2525

2626
# always run apt update when start and after add new source list, then clean up at end.
27-
RUN apt-get update -yqq && \
27+
RUN set -xe && apt-get update -yqq && \
2828
apt-get install -y apt-utils && \
2929
pecl channel-update pecl.php.net
3030

@@ -338,30 +338,29 @@ RUN if [ ${INSTALL_EXIF} = true ]; then \
338338
USER root
339339

340340
ARG INSTALL_AEROSPIKE=false
341-
ARG AEROSPIKE_PHP_REPOSITORY
342341

343-
RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
342+
RUN set -xe && if [ ${INSTALL_AEROSPIKE} = true ]; then \
344343
# Fix dependencies for PHPUnit within aerospike extension
345344
apt-get -y install sudo wget && \
346345
# Install the php aerospike extension
347346
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
348347
curl -L -o /tmp/aerospike-client-php.tar.gz https://github.com/aerospike/aerospike-client-php5/archive/master.tar.gz; \
349348
else \
350-
curl -L -o /tmp/aerospike-client-php.tar.gz ${AEROSPIKE_PHP_REPOSITORY}; \
349+
curl -L -o /tmp/aerospike-client-php.tar.gz https://github.com/aerospike/aerospike-client-php/archive/master.tar.gz; \
351350
fi \
352-
&& mkdir -p aerospike-client-php \
353-
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
351+
&& mkdir -p /tmp/aerospike-client-php \
352+
&& tar -C /tmp/aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
354353
&& \
355354
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
356355
( \
357-
cd aerospike-client-php/src/aerospike \
356+
cd /tmp/aerospike-client-php/src/aerospike \
358357
&& phpize \
359358
&& ./build.sh \
360359
&& make install \
361360
) \
362361
else \
363362
( \
364-
cd aerospike-client-php/src \
363+
cd /tmp/aerospike-client-php/src \
365364
&& phpize \
366365
&& ./build.sh \
367366
&& make install \

travis-build.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ if [ -n "${PHP_VERSION}" ]; then
1515
sed -i -- "s/PHP_VERSION=.*/PHP_VERSION=${PHP_VERSION}/g" .env
1616
sed -i -- 's/=false/=true/g' .env
1717
sed -i -- 's/PHPDBG=true/PHPDBG=false/g' .env
18-
if [ "${PHP_VERSION}" == "5.6" ]; then
19-
sed -i -- 's/^AEROSPIKE_PHP_REPOSITORY=/##AEROSPIKE_PHP_REPOSITORY=/g' .env
20-
sed -i -- 's/^# AEROSPIKE_PHP_REPOSITORY=/AEROSPIKE_PHP_REPOSITORY=/g' .env
21-
fi
2218
cat .env
2319
docker-compose build ${BUILD_SERVICE}
2420
docker images

workspace/Dockerfile

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ ARG PGID=1000
3737
ENV PGID ${PGID}
3838

3939
# always run apt update when start and after add new source list, then clean up at end.
40-
RUN apt-get update -yqq && \
40+
RUN set -xe && apt-get update -yqq && \
4141
pecl channel-update pecl.php.net && \
4242
groupadd -g ${PGID} laradock && \
4343
useradd -u ${PUID} -g laradock -m laradock -G docker_env && \
@@ -581,26 +581,29 @@ ENV PATH $PATH:/home/laradock/.yarn/bin
581581
USER root
582582

583583
ARG INSTALL_AEROSPIKE=false
584-
ARG AEROSPIKE_PHP_REPOSITORY
585584

586-
RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
585+
RUN set -xe && if [ ${INSTALL_AEROSPIKE} = true ]; then \
587586
# Fix dependencies for PHPUnit within aerospike extension
588587
apt-get -y install sudo wget && \
589588
# Install the php aerospike extension
590-
curl -L -o /tmp/aerospike-client-php.tar.gz ${AEROSPIKE_PHP_REPOSITORY} \
591-
&& mkdir -p aerospike-client-php \
592-
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
589+
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
590+
curl -L -o /tmp/aerospike-client-php.tar.gz https://github.com/aerospike/aerospike-client-php5/archive/master.tar.gz; \
591+
else \
592+
curl -L -o /tmp/aerospike-client-php.tar.gz https://github.com/aerospike/aerospike-client-php/archive/master.tar.gz; \
593+
fi \
594+
&& mkdir -p /tmp/aerospike-client-php \
595+
&& tar -C /tmp/aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
593596
&& \
594597
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
595598
( \
596-
cd aerospike-client-php/src/aerospike \
599+
cd /tmp/aerospike-client-php/src/aerospike \
597600
&& phpize \
598601
&& ./build.sh \
599602
&& make install \
600603
) \
601604
else \
602605
( \
603-
cd aerospike-client-php/src \
606+
cd /tmp/aerospike-client-php/src \
604607
&& phpize \
605608
&& ./build.sh \
606609
&& make install \

0 commit comments

Comments
 (0)