@@ -198,14 +198,18 @@ func doNginxBuild() {
198198func doPhpBuild () {
199199 util .Copy ("config/php/Dockerfile.build" , "config/php/Dockerfile" )
200200
201- packageList := []string {"symfony-cli" , " gnupg1" , "openssl" , "git" , "unzip" , "libzip-dev" , "nano" , "libpng-dev" , "libmagickwand-dev" , "curl" , "openssh-client" , "less" , "inkscape" , "cron" , "exiftool" , "libicu-dev" , "libmcrypt-dev" , "libc-client-dev" , "libkrb5-dev" , "libssl-dev" , "libxslt1-dev" , "bash-completion" }
201+ packageList := []string {"gnupg1" , "openssl" , "git" , "unzip" , "libzip-dev" , "nano" , "libpng-dev" , "libmagickwand-dev" , "curl" , "openssh-client" , "less" , "inkscape" , "cron" , "exiftool" , "libicu-dev" , "libmcrypt-dev" , "libc-client-dev" , "libkrb5-dev" , "libssl-dev" , "libxslt1-dev" , "bash-completion" }
202202 peclInstall := []string {}
203203 phpExtInstall := []string {"pdo" , "pdo_mysql" , "opcache" , "zip" , "gd" , "mysqli" , "exif" , "bcmath" , "calendar" , "intl" , "soap" , "imap" , "sockets" , "xsl" }
204204 phpExtEnable := []string {"mysqli" , "calendar" , "exif" , "bcmath" }
205205 npmInstallGlobal := []string {}
206206
207- if os .Getenv ("PHP_VERSION" ) != "8.0" && os .Getenv ("PHP_VERSION" ) != "8.1" {
208- phpExtInstall = append (phpExtInstall , "imagick" )
207+ if os .Getenv ("PHP_VERSION" ) != "5.6" && os .Getenv ("PHP_VERSION" ) != "7.0" && os .Getenv ("PHP_VERSION" ) != "7.1" {
208+ packageList = append (packageList , "symfony-cli" )
209+ }
210+
211+ if os .Getenv ("PHP_VERSION" ) != "8.2" {
212+ peclInstall = append (peclInstall , "imagick" )
209213 phpExtEnable = append (phpExtEnable , "imagick" )
210214 util .Sed ("__IMAGICK__" , "" , "config/php/Dockerfile" )
211215 }
@@ -219,11 +223,16 @@ func doPhpBuild() {
219223 phpExtEnable = append (phpExtEnable , "apcu" )
220224 }
221225
222- if os .Getenv ("PHP_VERSION" ) == "5.6" || os .Getenv ("PHP_VERSION" ) == "7.0" || os .Getenv ("PHP_VERSION" ) == "7.1" || os . Getenv ( "PHP_VERSION" ) == "7.2" || os . Getenv ( "PHP_VERSION" ) == "7.3" || os . Getenv ( "PHP_VERSION" ) == "7.4" {
226+ if os .Getenv ("PHP_VERSION" ) == "5.6" || os .Getenv ("PHP_VERSION" ) == "7.0" || os .Getenv ("PHP_VERSION" ) == "7.1" {
223227 phpExtInstall = append (phpExtInstall , "mcrypt" )
224228 phpExtEnable = append (phpExtEnable , "mcrypt" )
225229 }
226230
231+ if os .Getenv ("PHP_VERSION" ) == "7.2" || os .Getenv ("PHP_VERSION" ) == "7.3" || os .Getenv ("PHP_VERSION" ) == "7.4" || os .Getenv ("PHP_VERSION" ) == "8.0" || os .Getenv ("PHP_VERSION" ) == "8.1" {
232+ peclInstall = append (peclInstall , "mcrypt" )
233+ phpExtEnable = append (phpExtEnable , "mcrypt" )
234+ }
235+
227236 if os .Getenv ("PHP_VERSION" ) == "7.4" {
228237 util .Sed ("docker-php-ext-configure zip --with-libzip && " , "" , "config/php/Dockerfile" )
229238 util .Sed ("docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && " , "docker-php-ext-configure gd --with-freetype --with-jpeg && " , "config/php/Dockerfile" )
@@ -333,6 +342,12 @@ func doPhpBuild() {
333342 util .Sed ("__NPM_INSTALL_GLOBAL__" , strings .Join (npmInstallGlobal , " " ), "config/php/Dockerfile" )
334343 util .Sed ("__CLEANUP__" , "&& apt-get clean && rm -rf /var/lib/apt/lists/*" , "config/php/Dockerfile" )
335344
345+ if os .Getenv ("PHP_VERSION" ) != "5.6" && os .Getenv ("PHP_VERSION" ) != "7.0" && os .Getenv ("PHP_VERSION" ) != "7.1" {
346+ util .Sed ("__SYMFONY_CLI__" , "echo \" deb [trusted=yes] https://repo.symfony.com/apt/ /\" | tee /etc/apt/sources.list.d/symfony-cli.list && \\ " , "config/php/Dockerfile" )
347+ } else {
348+ util .Sed ("__SYMFONY_CLI__" , "\\ " , "config/php/Dockerfile" )
349+ }
350+
336351 util .Sed (" \n " , "" , "config/php/Dockerfile" )
337352}
338353
0 commit comments