|
100 | 100 |
|
101 | 101 | # install common PHP extensions |
102 | 102 | COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/ |
103 | | -' . (in_array($phpVersion, ['8.5'], true) ? 'RUN git clone --recurse-submodules https://github.com/phpredis/phpredis.git -b develop phpredis \ |
104 | | - && cd phpredis && git reset --hard 8be2306e4f && rm -r .git |
105 | | -' : '') . (in_array($phpVersion, ['8.5'], true) ? 'RUN git clone https://github.com/xdebug/xdebug.git -b master xdebug \ |
106 | | - && cd xdebug && git reset --hard edf1bf7482 && rm -r .git \ |
107 | | - && sed -E \'s~(<max>)[0-9]+.[0-9]+(.99</max>)~\199.99\2~\' -i package.xml && sed -E \'s~(if test "\$PHP_XDEBUG_FOUND_VERNUM" -ge ")[0-9]+(00"; then)~\19999\2~\' -i config.m4 |
108 | | -' : '') . 'RUN IPE_ICU_EN_ONLY=1 install-php-extensions \ |
| 103 | +' . 'RUN IPE_ICU_EN_ONLY=1 install-php-extensions \ |
109 | 104 | ' . implode(' \\' . "\n" . ' ', [ |
110 | | - 'bcmath', |
111 | | - 'exif', |
112 | | - 'gd', |
113 | | - 'gmp', |
114 | | - in_array($phpVersion, ['8.5'], true) ? 'igbinary/igbinary@2e0788825c' : 'igbinary', // TODO waiting for merge https://github.com/igbinary/igbinary/pull/408 |
115 | | - in_array($phpVersion, ['8.5'], true) ? 'Imagick/imagick@45adfb7b1e' : 'imagick', // TODO waiting for 3.8.1 release https://github.com/Imagick/imagick/pull/741 |
116 | | - 'intl', |
117 | | - 'mysqli', |
118 | | - in_array($phpVersion, ['7.4', '8.0', '8.1'], true) ? 'oci8' : 'php/pecl-database-oci8@e4c20008b0', |
119 | | - ...(in_array($phpVersion, ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4'], true) ? ['opcache'] : []), // https://wiki.php.net/rfc/make_opcache_required |
120 | | - 'pcntl', |
121 | | - 'pdo_mysql', |
122 | | - in_array($phpVersion, ['7.4', '8.0', '8.1', '8.2'], true) ? 'pdo_oci' : 'php/pecl-database-pdo_oci@6575b4c5fe', |
123 | | - 'pdo_pgsql', |
124 | 105 | 'pdo_sqlsrv', |
125 | | - in_array($phpVersion, ['8.5'], true) ? '$(realpath phpredis)' : 'redis', // TODO waiting for 6.2.1 release https://github.com/phpredis/phpredis/pull/2676 |
126 | | - 'sockets', |
127 | | - 'tidy', |
128 | | - in_array($phpVersion, ['8.5'], true) ? '$(realpath xdebug)' : 'xdebug', |
129 | | - 'xsl', |
130 | | - 'zip', |
131 | | - ]) . ($osName === 'alpine' ? ' \ |
132 | | - # remove Ghostscript binary, reduce Alpine image size by 23 MB, remove once https://gitlab.alpinelinux.org/alpine/aports/-/issues/13415 is fixed |
133 | | - && rm /usr/bin/gs' : '') . ' \ |
134 | | - # pack Oracle Instant Client libs, reduce image size by 85 MB |
135 | | - && rm /usr/lib/oracle/*/client64/lib/*.jar && tar -czvf /usr/lib/oracle-pack.tar.gz -C / /usr/lib/oracle /usr/local/etc/php/conf.d/docker-php-ext-pdo_oci.ini /usr/local/etc/php/conf.d/docker-php-ext-oci8.ini && rm -r /usr/lib/oracle/* /usr/local/etc/php/conf.d/docker-php-ext-pdo_oci.ini /usr/local/etc/php/conf.d/docker-php-ext-oci8.ini && mv /usr/lib/oracle-pack.tar.gz /usr/lib/oracle/pack.tar.gz \ |
136 | | - && { echo \'#!/bin/sh\'; echo \'if [ ! -d /usr/lib/oracle/*/client64 ]; then\'; echo \' tar -xzf /usr/lib/oracle/pack.tar.gz -C / && rm /usr/lib/oracle/pack.tar.gz\'; echo \'fi\'; } > /usr/lib/oracle/setup.sh && chmod +x /usr/lib/oracle/setup.sh |
| 106 | + ]) . ' |
137 | 107 |
|
138 | 108 | # install Composer |
139 | 109 | RUN install-php-extensions @composer |
|
149 | 119 | }, [ |
150 | 120 | '/usr/local/bin/php', |
151 | 121 | '/usr/local/lib/libphp' . (in_array($phpVersion, ['7.4'], true) ? '7' : '') . '.so', |
152 | | - '"$(find /usr/local/lib/php/extensions -name bcmath.so)"', |
153 | | - '"$(find /usr/local/lib/php/extensions -name xdebug.so)"', |
154 | 122 | ])) . ' |
155 | 123 | RUN composer diagnose |
156 | 124 | RUN mkdir t && (cd t && ' . (in_array($phpVersion, ['8.5'], true) ? 'echo \'{}\' > composer.json && composer config platform.php 8.4 && ' : '') . 'composer require phpunit/phpunit) && rm -r t/ |
|
0 commit comments