File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ RUN set -ex; \
39
39
\
40
40
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
41
41
rm -rf /var/lib/apt/lists/*; \
42
- ldd "$extdir"/*.so | grep -qzv "=> not found";
42
+ ldd "$extdir"/*.so | grep -qzv "=> not found" || (echo "Sanity check failed: missing libraries:"; ldd "$extdir"/*.so | grep " => not found"; exit 1); \
43
+ ldd "$extdir"/*.so | grep -q "libzip.so.* => .*/libzip.so.*" || (echo "Sanity check failed: libzip.so is not referenced"; ldd "$extdir"/*.so; exit 1);
43
44
44
45
# set recommended PHP.ini settings
45
46
# see https://secure.php.net/manual/en/opcache.installation.php
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ RUN set -ex; \
30
30
extdir="$(php -r 'echo ini_get(" extension_dir");')" ; \
31
31
ldd "$extdir" /*.so \
32
32
| awk '/=>/ { print $3 }' \
33
+ | awk '{print $1} {system("realpath " $1)}' \
33
34
| sort -u \
34
35
| xargs -r dpkg-query -S \
35
36
| cut -d: -f1 \
@@ -38,7 +39,8 @@ RUN set -ex; \
38
39
\
39
40
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
40
41
rm -rf /var/lib/apt/lists/*; \
41
- ldd "$extdir" /*.so | grep -qzv "=> not found" ;
42
+ ldd "$extdir" /*.so | grep -qzv "=> not found" || (echo "Sanity check failed: missing libraries:" ; ldd "$extdir" /*.so | grep " => not found" ; exit 1); \
43
+ ldd "$extdir" /*.so | grep -q "libzip.so.* => .*/libzip.so.*" || (echo "Sanity check failed: libzip.so is not referenced" ; ldd "$extdir" /*.so; exit 1);
42
44
43
45
# set recommended PHP.ini settings
44
46
# see https://secure.php.net/manual/en/opcache.installation.php
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ RUN set -ex; \
30
30
extdir="$(php -r 'echo ini_get(" extension_dir");')" ; \
31
31
ldd "$extdir" /*.so \
32
32
| awk '/=>/ { print $3 }' \
33
+ | awk '{print $1} {system("realpath " $1)}' \
33
34
| sort -u \
34
35
| xargs -r dpkg-query -S \
35
36
| cut -d: -f1 \
@@ -38,7 +39,8 @@ RUN set -ex; \
38
39
\
39
40
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
40
41
rm -rf /var/lib/apt/lists/*; \
41
- ldd "$extdir" /*.so | grep -qzv "=> not found" ;
42
+ ldd "$extdir" /*.so | grep -qzv "=> not found" || (echo "Sanity check failed: missing libraries:" ; ldd "$extdir" /*.so | grep " => not found" ; exit 1); \
43
+ ldd "$extdir" /*.so | grep -q "libzip.so.* => .*/libzip.so.*" || (echo "Sanity check failed: libzip.so is not referenced" ; ldd "$extdir" /*.so; exit 1);
42
44
43
45
# set recommended PHP.ini settings
44
46
# see https://secure.php.net/manual/en/opcache.installation.php
You can’t perform that action at this time.
0 commit comments