File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ RUN set -ex; \
3939 \
4040 apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
4141 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);
4344
4445# set recommended PHP.ini settings
4546# 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; \
3030 extdir="$(php -r 'echo ini_get(" extension_dir");')" ; \
3131 ldd "$extdir" /*.so \
3232 | awk '/=>/ { print $3 }' \
33+ | awk '{print $1} {system("realpath " $1)}' \
3334 | sort -u \
3435 | xargs -r dpkg-query -S \
3536 | cut -d: -f1 \
@@ -38,7 +39,8 @@ RUN set -ex; \
3839 \
3940 apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
4041 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);
4244
4345# set recommended PHP.ini settings
4446# 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; \
3030 extdir="$(php -r 'echo ini_get(" extension_dir");')" ; \
3131 ldd "$extdir" /*.so \
3232 | awk '/=>/ { print $3 }' \
33+ | awk '{print $1} {system("realpath " $1)}' \
3334 | sort -u \
3435 | xargs -r dpkg-query -S \
3536 | cut -d: -f1 \
@@ -38,7 +39,8 @@ RUN set -ex; \
3839 \
3940 apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
4041 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);
4244
4345# set recommended PHP.ini settings
4446# see https://secure.php.net/manual/en/opcache.installation.php
You can’t perform that action at this time.
0 commit comments