Skip to content

Commit ad0460c

Browse files
authored
[Tests] php install failure (Docker) (aces#8239)
Fix Docker image when run locally GitHub Actions replaces the PHP version in the docker image, but the default version is too old to run LORIS when not replaced by GitHub Actions. This upgrades the default version so that tests can be run locally without modifying the Docker image.
1 parent 13cd3b0 commit ad0460c

4 files changed

+17
-16
lines changed

Dockerfile.test.php7.debug

-12
This file was deleted.

Dockerfile.test.php8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:8.0
1+
FROM php:8.1
22

33
RUN apt-get update && \
44
apt-get install -y mariadb-client libzip-dev

Dockerfile.test.php8.debug

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM php:8.1
2+
3+
RUN apt-get update && \
4+
apt-get install -y mariadb-client libzip-dev
5+
6+
RUN yes | pecl install xdebug-3.1.0
7+
RUN echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini
8+
RUN echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/xdebug.ini
9+
RUN echo "xdebug.start_with_request=yes" >> /usr/local/etc/php/conf.d/xdebug.ini
10+
11+
# Install extensions through the scripts the container provides
12+
RUN apt-get install -y libzip-dev zip && \
13+
docker-php-ext-install pdo_mysql zip

docker-compose.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ services:
7373
web-debug:
7474
build:
7575
context: .
76-
dockerfile: Dockerfile.test.php7.debug
76+
dockerfile: Dockerfile.test.php8.debug
7777
volumes:
7878
- ./:/app
7979
- ./test/test_instrument:/app/project/instruments
@@ -88,7 +88,7 @@ services:
8888
unit-tests-debug:
8989
build:
9090
context: .
91-
dockerfile: Dockerfile.test.php7.debug
91+
dockerfile: Dockerfile.test.php8.debug
9292
volumes:
9393
- ./:/app
9494
working_dir: /app
@@ -103,7 +103,7 @@ services:
103103
integration-tests-debug:
104104
build:
105105
context: .
106-
dockerfile: Dockerfile.test.php7.debug
106+
dockerfile: Dockerfile.test.php8.debug
107107
volumes:
108108
- ./:/app
109109
working_dir: /app

0 commit comments

Comments
 (0)