You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove build dependencies after docker-php-ext-install #557
Since removing build dependencies after installing PHP extensions (e.g. docker-library/wordpress#267) seems to be a common task it would make sense to have such a functionality in the docker-php-ext-* scripts.
Reacted by Tobias Petry, Maciej Tomaszewski-Mikut, Cédric Schieli and Masaaki Uegaki
We don't auto-add build dependencies in Debian since any needed for phpize are already installed. See #513 (comment) and #438 for why we don't auto add/remove packages in Debian.
As for any other dependencies that could be installed in a Dockerfile, since we didn't add them, we can't reasonably detect that they can be removed.
Activity
ebuildy commentedon May 16, 2018
/usr/src/php.tar.xzcan be removed too ?docker run --rm php:7.2.5-cli-alpine3.7 ls -alh /usr/src=> 11.5M (16% of the total image size)J0WI commentedon May 16, 2018
Nope, that is used here.
ebuildy commentedon May 16, 2018
yes, I mean, once we have installed the dependencies, we could remove it too (not use at run-time).
yosifkit commentedon Sep 12, 2018
As for deleting the source, that would be a duplicate of #488.
For auto-removing build dependencies that we add, that is done in the Alpine images:
php/docker-php-ext-install
Lines 116 to 118 in 4017680
We don't auto-add build dependencies in Debian since any needed for
phpizeare already installed. See #513 (comment) and #438 for why we don't auto add/remove packages in Debian.As for any other dependencies that could be installed in a Dockerfile, since we didn't add them, we can't reasonably detect that they can be removed.