File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,8 @@ install:
1212 - docker version
1313 - sudo pip install docker-compose
1414 - docker-compose version
15- - sed -i -e "s/php:cli/php:${TRAVIS_PHP_VERSION}-cli/g" Dockerfile
1615 - cat Dockerfile
17- - docker-compose build
16+ - docker-compose build --build-arg PHP_VERSION=${TRAVIS_PHP_VERSION}
1817
1918script :
2019 - docker-compose up --exit-code-from php
Original file line number Diff line number Diff line change 1- FROM php:cli
1+ ARG PHP_VERSION
2+
3+ FROM php:${PHP_VERSION}-cli
24
35RUN pecl install xdebug
46
57RUN apt-get update && \
6- apt-get install -y autoconf pkg-config libssl-dev git && \
7- pecl install mongodb git zlib1g-dev && docker-php-ext-enable mongodb && \
8+ apt-get install -y autoconf pkg-config libssl-dev git zlib1g-dev
9+
10+ RUN pecl install mongodb && docker-php-ext-enable mongodb && \
811 docker-php-ext-install -j$(nproc) pdo pdo_mysql zip && docker-php-ext-enable xdebug
912
1013RUN curl -sS https://getcomposer.org/installer | php \
Original file line number Diff line number Diff line change 11version : ' 3'
22
33services :
4-
54 php :
65 container_name : php
76 build :
@@ -10,6 +9,8 @@ services:
109 volumes :
1110 - .:/code
1211 working_dir : /code
12+ environment :
13+ PHP_VERSION : 7.1
1314 command : bash -c "composer install --prefer-source --no-interaction && php ./vendor/bin/phpunit"
1415 depends_on :
1516 - mysql
You can’t perform that action at this time.
0 commit comments