diff --git a/CHANGELOG.md b/CHANGELOG.md index c4e0ac5..f1d2986 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,3 +4,7 @@ - [2025-11-01] DamImpr: reset changelog [#26](https://github.com/DamImpr/cache-multi-layer/pull/26) - [2025-11-01] DamImpr: Add CHANGELOG.md to export-ignore list [#27](https://github.com/DamImpr/cache-multi-layer/pull/27) + +- [2025-12-15] DamImpr: create different docker with different php version [#28](https://github.com/DamImpr/cache-multi-layer/pull/28) + +- [2025-12-15] DamImpr: create different docker with different php version [#28](https://github.com/DamImpr/cache-multi-layer/pull/28) diff --git a/Dockerfile b/Dockerfile index af2debd..01d12b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ -FROM php:8.2-cli-alpine +ARG PHP_VERSION=8.2 +FROM php:${PHP_VERSION}-cli-alpine RUN apk add --no-cache \ libzip-dev \ diff --git a/commands b/commands index 7cde633..3de710f 100644 --- a/commands +++ b/commands @@ -2,7 +2,11 @@ case "$1" in 'test-sw') - docker compose run --rm --remove-orphans app test-sw && docker compose down + for i in 8.2 8.3 8.4 + do + PHP_VERSION=$i docker compose build + docker compose run --rm --remove-orphans app test-sw && docker compose down + done ;; 'update-vendor') docker compose run --rm --remove-orphans app update-vendor && docker compose down diff --git a/docker-compose.yml b/docker-compose.yml index e26fbac..642edd1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,9 @@ services: app: - build: . + build: + context: . + args: + PHP_VERSION: ${PHP_VERSION:-8.2} volumes: - ./src:/app/src - ./tests:/app//tests