Skip to content

Commit 493f1f7

Browse files
authored
Merge pull request #28 from DamImpr/multi-docker-test
create different docker with different php version
2 parents 3f1c512 + 43ec348 commit 493f1f7

4 files changed

Lines changed: 15 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@
44
- [2025-11-01] DamImpr: reset changelog [#26](https://github.com/DamImpr/cache-multi-layer/pull/26)
55

66
- [2025-11-01] DamImpr: Add CHANGELOG.md to export-ignore list [#27](https://github.com/DamImpr/cache-multi-layer/pull/27)
7+
8+
- [2025-12-15] DamImpr: create different docker with different php version [#28](https://github.com/DamImpr/cache-multi-layer/pull/28)
9+
10+
- [2025-12-15] DamImpr: create different docker with different php version [#28](https://github.com/DamImpr/cache-multi-layer/pull/28)

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FROM php:8.2-cli-alpine
1+
ARG PHP_VERSION=8.2
2+
FROM php:${PHP_VERSION}-cli-alpine
23

34
RUN apk add --no-cache \
45
libzip-dev \

commands

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
case "$1" in
44
'test-sw')
5-
docker compose run --rm --remove-orphans app test-sw && docker compose down
5+
for i in 8.2 8.3 8.4
6+
do
7+
PHP_VERSION=$i docker compose build
8+
docker compose run --rm --remove-orphans app test-sw && docker compose down
9+
done
610
;;
711
'update-vendor')
812
docker compose run --rm --remove-orphans app update-vendor && docker compose down

docker-compose.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
services:
22
app:
3-
build: .
3+
build:
4+
context: .
5+
args:
6+
PHP_VERSION: ${PHP_VERSION:-8.2}
47
volumes:
58
- ./src:/app/src
69
- ./tests:/app//tests

0 commit comments

Comments
 (0)