Skip to content

Commit 5bfa70e

Browse files
authored
Merge pull request #456 from PrestaShop/updateGenerateTags
`generate_tags.sh` : Improve for PHP8.1+
2 parents 9c42bb5 + a91d915 commit 5bfa70e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

base/generate_tags.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,21 @@ generate_image()
4949
s/'"${before}"'/'"${after}"'/
5050
' images/$folder/Dockerfile
5151
fi
52+
if [[ $version = *"8.1"* || $version = *"8.2"* || $version = *"8.3"* || $version = *"8.4"* || $version = *"8.5"* ]]; then
53+
local before="FROM php:${version}"
54+
local after="# Debian Trixie provides a package of the MySQL client that prevent the connexion to succeed for SSL reasons\n# We stick to Bookworm until we find the solution\nFROM php:${version}-bookworm"
55+
sed -i '
56+
s/'"${before}"'/'"${after}"'/
57+
' images/$folder/Dockerfile
58+
59+
if [[ $version = *"8.5"* ]]; then
60+
## -z is used for final line break
61+
local before=' && if \[ -d \"\/usr\/src\/php\/ext\/opcache\" \]; then docker-php-ext-install opcache; fi \\\n'
62+
sed -z -i '
63+
s/'"${before}"'/'""'/g
64+
' images/$folder/Dockerfile
65+
fi
66+
fi
5267

5368
cp -R config_files images/$folder/
5469
sed '

0 commit comments

Comments
 (0)