Skip to content

Commit

Permalink
Do not remove manually marked dependencies of php extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
williamdes committed Jan 24, 2025
1 parent 5d89c07 commit 188a0e3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
7 changes: 1 addition & 6 deletions Dockerfile-debian.template
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,7 @@ RUN set -ex; \
ldd "$extdir"/*.so | grep -qzv "=> not found" || (echo "Sanity check failed: missing libraries:"; ldd "$extdir"/*.so | grep " => not found"; exit 1); \
ldd "$extdir"/*.so | grep -q "libzip.so.* => .*/libzip.so.*" || (echo "Sanity check failed: libzip.so is not referenced"; ldd "$extdir"/*.so; exit 1); \
err="$(php --version 3>&1 1>&2 2>&3)"; \
[ -z "$err" ] || (echo "Sanity check failed: php returned errors; $err"; exit 1;); \
\
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
[ -z "$err" ] || (echo "Sanity check failed: php returned errors; $err"; exit 1;);

# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
Expand Down
7 changes: 1 addition & 6 deletions apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,7 @@ RUN set -ex; \
ldd "$extdir"/*.so | grep -qzv "=> not found" || (echo "Sanity check failed: missing libraries:"; ldd "$extdir"/*.so | grep " => not found"; exit 1); \
ldd "$extdir"/*.so | grep -q "libzip.so.* => .*/libzip.so.*" || (echo "Sanity check failed: libzip.so is not referenced"; ldd "$extdir"/*.so; exit 1); \
err="$(php --version 3>&1 1>&2 2>&3)"; \
[ -z "$err" ] || (echo "Sanity check failed: php returned errors; $err"; exit 1;); \
\
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
[ -z "$err" ] || (echo "Sanity check failed: php returned errors; $err"; exit 1;);

# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
Expand Down
7 changes: 1 addition & 6 deletions fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,7 @@ RUN set -ex; \
ldd "$extdir"/*.so | grep -qzv "=> not found" || (echo "Sanity check failed: missing libraries:"; ldd "$extdir"/*.so | grep " => not found"; exit 1); \
ldd "$extdir"/*.so | grep -q "libzip.so.* => .*/libzip.so.*" || (echo "Sanity check failed: libzip.so is not referenced"; ldd "$extdir"/*.so; exit 1); \
err="$(php --version 3>&1 1>&2 2>&3)"; \
[ -z "$err" ] || (echo "Sanity check failed: php returned errors; $err"; exit 1;); \
\
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
[ -z "$err" ] || (echo "Sanity check failed: php returned errors; $err"; exit 1;);

# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
Expand Down

0 comments on commit 188a0e3

Please sign in to comment.