44# Generates Dockerfiles for specified PHP versions
55#
66
7- # PHP Versions that will be generated
7+ # PHP Versions that will be generated
88# php_versions=( "8.0" "7.4" "7.2" "7.1" "7.0" "5.6")
9- php_versions=( " 8.0" " 7.4" " 7.2" )
9+ php_versions=( " 8.1 " " 8. 0" " 7.4" " 7.2" )
1010
1111# PHP variants that will be generated for each PHP version
1212# final source image will be generated as follow: php:7.2-cli, php:7-2-apache and php:7.2-fpm
@@ -15,37 +15,38 @@ php_docker_suffix=( "cli" "apache" "fpm" )
1515# Map of xdebug versions for PHP images
1616# PHP_VERSION => XDEBUG_VERSION
1717declare -A xdebug_versions
18- xdebug_versions=(
19- [" 8.0" ]=" xdebug-3.0.4"
20- [" 7.4" ]=" xdebug-2.9.1"
21- [" 7.2" ]=" xdebug-2.6.0"
22- [" 7.1" ]=" xdebug-2.6.0"
23- [" 7.0" ]=" xdebug-2.6.0"
24- [" 5.6" ]=" xdebug-2.5.5"
18+ xdebug_versions=(
19+ [" 8.1" ]=" xdebug-3.1.3"
20+ [" 8.0" ]=" xdebug-3.1.3"
21+ [" 7.4" ]=" xdebug-2.9.1"
22+ [" 7.2" ]=" xdebug-2.6.0"
23+ [" 7.1" ]=" xdebug-2.6.0"
24+ [" 7.0" ]=" xdebug-2.6.0"
25+ [" 5.6" ]=" xdebug-2.5.5"
2526)
2627
2728
2829# Changes current path to project root
2930script_path=$( dirname " $0 " )
30- cd " ${script_path} /../" || exit - 1
31+ cd " ${script_path} /../" || exit 1
3132
3233# Generates Dockerfiles for each PHP version and variant
33- for php_version in " ${php_versions[@]} " ; do
34+ for php_version in " ${php_versions[@]} " ; do
3435 for php_suffix in " ${php_docker_suffix[@]} " ; do
3536 target_dir=" ./build/${php_version} -${php_suffix} "
3637 target_dockerfile=" ${target_dir} /Dockerfile"
37-
38+
3839 base_image=" php:${php_version} -${php_suffix} "
3940 xdebug_version=" ${xdebug_versions[${php_version}]} "
40-
41+
4142 mkdir -p " ${target_dir} "
4243 cp ./src/xdebug.ini " ${target_dir} /xdebug.ini"
43-
44+
4445 # shellcheck disable=SC2002
4546 cat ./src/Dockerfile \
4647 | sed " s/#BASE_IMAGE#/${base_image} /g" \
4748 | sed " s/#XDEBUG_VERSION#/${xdebug_version} /g" \
4849 > " ${target_dockerfile} "
4950 echo " Generated ${target_dockerfile} "
5051 done
51- done
52+ done
0 commit comments