Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

Commit c90b6c3

Browse files
committed
fix build error
1 parent fcc5b52 commit c90b6c3

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
dockerfile: tests/docker/Dockerfile
77
context: .
88
args:
9-
- PHP_VERSION=${PHP_VERSION:-7.4}
9+
- BUILD_PHP_VERSION=${PHP_VERSION:-7.4}
1010
extra_hosts: # https://stackoverflow.com/a/67158212/1106908
1111
- "host.docker.internal:host-gateway"
1212
volumes:

tests/docker/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
ARG PHP_VERSION
1+
ARG BUILD_PHP_VERSION
22
#FROM php:7.1-cli
3-
FROM php:$PHP_VERSION-cli
3+
FROM php:$BUILD_PHP_VERSION-cli
4+
# ARG is lost after FROM, so we need to specify it again https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
5+
ARG BUILD_PHP_VERSION
46

57
ENV DEBIAN_FRONTEND=noninteractive
68

@@ -33,7 +35,7 @@ RUN apt-get update && \
3335
apt-get clean && \
3436
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
3537
# https://xdebug.org/docs/compat \
36-
&& if [ "$PHP_VERSION" = "8.2" ] ; then pecl install xdebug ; else pecl install xdebug-3.1.5 ; fi \
38+
&& if [ "$BUILD_PHP_VERSION" = "8.2" ] ; then pecl install xdebug ; else pecl install xdebug-3.1.5 ; fi \
3739
&& docker-php-ext-enable xdebug \
3840
&& docker-php-ext-install \
3941
zip \

0 commit comments

Comments
 (0)