Skip to content

Commit d419b25

Browse files
committed
wip short debug
1 parent 31cdf13 commit d419b25

File tree

6 files changed

+10
-181
lines changed

6 files changed

+10
-181
lines changed

data/8.4-alpine/Dockerfile

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,7 @@ RUN apk update \
1313
# install common PHP extensions
1414
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
1515
RUN IPE_ICU_EN_ONLY=1 install-php-extensions \
16-
bcmath \
17-
exif \
18-
gd \
19-
gmp \
20-
igbinary \
21-
imagick \
22-
intl \
23-
mysqli \
24-
php/pecl-database-oci8@e4c20008b0 \
25-
opcache \
26-
pcntl \
27-
pdo_mysql \
28-
php/pecl-database-pdo_oci@6575b4c5fe \
29-
pdo_pgsql \
30-
pdo_sqlsrv \
31-
redis \
32-
sockets \
33-
tidy \
34-
xdebug \
35-
xsl \
36-
zip \
37-
# remove Ghostscript binary, reduce Alpine image size by 23 MB, remove once https://gitlab.alpinelinux.org/alpine/aports/-/issues/13415 is fixed
38-
&& rm /usr/bin/gs \
39-
# pack Oracle Instant Client libs, reduce image size by 85 MB
40-
&& 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 \
41-
&& { 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
16+
pdo_sqlsrv
4217

4318
# install Composer
4419
RUN install-php-extensions @composer
@@ -52,9 +27,7 @@ RUN apk update \
5227
&& apk add binutils \
5328
&& rm -rf /var/cache/apk/*
5429
RUN ! readelf -S /usr/local/bin/php | grep -q ' \.symtab ' \
55-
&& ! readelf -S /usr/local/lib/libphp.so | grep -q ' \.symtab ' \
56-
&& ! readelf -S "$(find /usr/local/lib/php/extensions -name bcmath.so)" | grep -q ' \.symtab ' \
57-
&& ! readelf -S "$(find /usr/local/lib/php/extensions -name xdebug.so)" | grep -q ' \.symtab '
30+
&& ! readelf -S /usr/local/lib/libphp.so | grep -q ' \.symtab '
5831
RUN composer diagnose
5932
RUN mkdir t && (cd t && composer require phpunit/phpunit) && rm -r t/
6033

data/8.4-debian/Dockerfile

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,7 @@ RUN (seq 1 8 | xargs -I{} mkdir -p /usr/share/man/man{}) \
1414
# install common PHP extensions
1515
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
1616
RUN IPE_ICU_EN_ONLY=1 install-php-extensions \
17-
bcmath \
18-
exif \
19-
gd \
20-
gmp \
21-
igbinary \
22-
imagick \
23-
intl \
24-
mysqli \
25-
php/pecl-database-oci8@e4c20008b0 \
26-
opcache \
27-
pcntl \
28-
pdo_mysql \
29-
php/pecl-database-pdo_oci@6575b4c5fe \
30-
pdo_pgsql \
31-
pdo_sqlsrv \
32-
redis \
33-
sockets \
34-
tidy \
35-
xdebug \
36-
xsl \
37-
zip \
38-
# pack Oracle Instant Client libs, reduce image size by 85 MB
39-
&& 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 \
40-
&& { 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
17+
pdo_sqlsrv
4118

4219
# install Composer
4320
RUN install-php-extensions @composer
@@ -51,9 +28,7 @@ RUN apt-get -y update \
5128
&& apt-get -y install binutils \
5229
&& apt-get purge -y --auto-remove && apt-get clean && rm -rf /var/lib/apt/lists/*
5330
RUN ! readelf -S /usr/local/bin/php | grep -q ' \.symtab ' \
54-
&& ! readelf -S /usr/local/lib/libphp.so | grep -q ' \.symtab ' \
55-
&& ! readelf -S "$(find /usr/local/lib/php/extensions -name bcmath.so)" | grep -q ' \.symtab ' \
56-
&& ! readelf -S "$(find /usr/local/lib/php/extensions -name xdebug.so)" | grep -q ' \.symtab '
31+
&& ! readelf -S /usr/local/lib/libphp.so | grep -q ' \.symtab '
5732
RUN composer diagnose
5833
RUN mkdir t && (cd t && composer require phpunit/phpunit) && rm -r t/
5934

data/8.5-alpine/Dockerfile

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,37 +12,8 @@ RUN apk update \
1212

1313
# install common PHP extensions
1414
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
15-
RUN git clone --recurse-submodules https://github.com/phpredis/phpredis.git -b develop phpredis \
16-
&& cd phpredis && git reset --hard 8be2306e4f && rm -r .git
17-
RUN git clone https://github.com/xdebug/xdebug.git -b master xdebug \
18-
&& cd xdebug && git reset --hard edf1bf7482 && rm -r .git \
19-
&& 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
2015
RUN IPE_ICU_EN_ONLY=1 install-php-extensions \
21-
bcmath \
22-
exif \
23-
gd \
24-
gmp \
25-
igbinary/igbinary@2e0788825c \
26-
Imagick/imagick@45adfb7b1e \
27-
intl \
28-
mysqli \
29-
php/pecl-database-oci8@e4c20008b0 \
30-
pcntl \
31-
pdo_mysql \
32-
php/pecl-database-pdo_oci@6575b4c5fe \
33-
pdo_pgsql \
34-
pdo_sqlsrv \
35-
$(realpath phpredis) \
36-
sockets \
37-
tidy \
38-
$(realpath xdebug) \
39-
xsl \
40-
zip \
41-
# remove Ghostscript binary, reduce Alpine image size by 23 MB, remove once https://gitlab.alpinelinux.org/alpine/aports/-/issues/13415 is fixed
42-
&& rm /usr/bin/gs \
43-
# pack Oracle Instant Client libs, reduce image size by 85 MB
44-
&& 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 \
45-
&& { 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
16+
pdo_sqlsrv
4617

4718
# install Composer
4819
RUN install-php-extensions @composer
@@ -56,9 +27,7 @@ RUN apk update \
5627
&& apk add binutils \
5728
&& rm -rf /var/cache/apk/*
5829
RUN ! readelf -S /usr/local/bin/php | grep -q ' \.symtab ' \
59-
&& ! readelf -S /usr/local/lib/libphp.so | grep -q ' \.symtab ' \
60-
&& ! readelf -S "$(find /usr/local/lib/php/extensions -name bcmath.so)" | grep -q ' \.symtab ' \
61-
&& ! readelf -S "$(find /usr/local/lib/php/extensions -name xdebug.so)" | grep -q ' \.symtab '
30+
&& ! readelf -S /usr/local/lib/libphp.so | grep -q ' \.symtab '
6231
RUN composer diagnose
6332
RUN mkdir t && (cd t && echo '{}' > composer.json && composer config platform.php 8.4 && composer require phpunit/phpunit) && rm -r t/
6433

data/8.5-debian/Dockerfile

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,8 @@ RUN (seq 1 8 | xargs -I{} mkdir -p /usr/share/man/man{}) \
1313

1414
# install common PHP extensions
1515
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
16-
RUN git clone --recurse-submodules https://github.com/phpredis/phpredis.git -b develop phpredis \
17-
&& cd phpredis && git reset --hard 8be2306e4f && rm -r .git
18-
RUN git clone https://github.com/xdebug/xdebug.git -b master xdebug \
19-
&& cd xdebug && git reset --hard edf1bf7482 && rm -r .git \
20-
&& 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
2116
RUN IPE_ICU_EN_ONLY=1 install-php-extensions \
22-
bcmath \
23-
exif \
24-
gd \
25-
gmp \
26-
igbinary/igbinary@2e0788825c \
27-
Imagick/imagick@45adfb7b1e \
28-
intl \
29-
mysqli \
30-
php/pecl-database-oci8@e4c20008b0 \
31-
pcntl \
32-
pdo_mysql \
33-
php/pecl-database-pdo_oci@6575b4c5fe \
34-
pdo_pgsql \
35-
pdo_sqlsrv \
36-
$(realpath phpredis) \
37-
sockets \
38-
tidy \
39-
$(realpath xdebug) \
40-
xsl \
41-
zip \
42-
# pack Oracle Instant Client libs, reduce image size by 85 MB
43-
&& 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 \
44-
&& { 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
17+
pdo_sqlsrv
4518

4619
# install Composer
4720
RUN install-php-extensions @composer
@@ -55,9 +28,7 @@ RUN apt-get -y update \
5528
&& apt-get -y install binutils \
5629
&& apt-get purge -y --auto-remove && apt-get clean && rm -rf /var/lib/apt/lists/*
5730
RUN ! readelf -S /usr/local/bin/php | grep -q ' \.symtab ' \
58-
&& ! readelf -S /usr/local/lib/libphp.so | grep -q ' \.symtab ' \
59-
&& ! readelf -S "$(find /usr/local/lib/php/extensions -name bcmath.so)" | grep -q ' \.symtab ' \
60-
&& ! readelf -S "$(find /usr/local/lib/php/extensions -name xdebug.so)" | grep -q ' \.symtab '
31+
&& ! readelf -S /usr/local/lib/libphp.so | grep -q ' \.symtab '
6132
RUN composer diagnose
6233
RUN mkdir t && (cd t && echo '{}' > composer.json && composer config platform.php 8.4 && composer require phpunit/phpunit) && rm -r t/
6334

make.php

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -100,40 +100,10 @@
100100
101101
# install common PHP extensions
102102
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 \
109104
' . 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',
124105
'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+
]) . '
137107
138108
# install Composer
139109
RUN install-php-extensions @composer
@@ -149,8 +119,6 @@
149119
}, [
150120
'/usr/local/bin/php',
151121
'/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)"',
154122
])) . '
155123
RUN composer diagnose
156124
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/

test.php

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,7 @@
66

77
$loadedExts = get_loaded_extensions();
88
$missingExts = array_diff([
9-
'bcmath',
10-
'curl',
11-
'exif',
12-
'gd',
13-
'gmp',
14-
'igbinary',
15-
'imagick',
16-
'intl',
17-
'mbstring',
18-
'mysqli',
19-
'mysqlnd',
20-
'oci8',
21-
'openssl',
22-
'pdo_mysql',
23-
'PDO_OCI',
24-
'pdo_pgsql',
25-
'pdo_sqlite',
269
'pdo_sqlsrv',
27-
'pcntl',
28-
'redis',
29-
'sockets',
30-
'sqlite3',
31-
'tidy',
32-
'xdebug',
33-
'xml',
34-
'xsl',
35-
'Zend OPcache',
36-
'zip',
3710
], $loadedExts);
3811

3912
if (count($missingExts) > 0) {

0 commit comments

Comments
 (0)