Skip to content

Commit 1e7ba89

Browse files
committed
Enable development for multiple PHP version
1 parent ea963f9 commit 1e7ba89

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,15 @@ clean_all:
2323
sudo rm -rf tests/tmp/*
2424

2525
up:
26+
docker-compose build
2627
docker-compose up -d
2728
docker-compose run --rm php bash -c 'chmod +rw -R tests/tmp'
2829
docker-compose run --rm php bash -c 'chmod +rw -R tests/codeception'
2930
docker-compose run --rm php bash -c 'mkdir -p tests/testapp/runtime && chmod +rw -R tests/testapp/runtime'
3031
docker-compose run --rm php bash -c 'chmod -R 777 tests/testapp/runtime' # TODO avoid 777
3132

33+
down:
34+
docker-compose down --remove-orphans
3235

3336
cli:
3437
docker-compose exec php bash

docker-compose.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
version: "3.5"
22
services:
33
php:
4-
build: tests/docker
4+
build:
5+
context: tests/docker
6+
args:
7+
- BUILD_PHP_VERSION=${PHP_VERSION}
58
volumes:
69
- ./tests/tmp/.composer:/root/.composer:rw
710
- .:/app

tests/docker/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
FROM yiisoftware/yii2-php:8.0-apache
1+
ARG BUILD_PHP_VERSION
2+
3+
FROM yiisoftware/yii2-php:${BUILD_PHP_VERSION}-apache
4+
5+
ARG BUILD_PHP_VERSION
26

37
ENV INSIDE_DOCKER=1
48

0 commit comments

Comments
 (0)