-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debian Stretch Apache 5.6 Dockerfile leaves unnecessary build-time dependencies in layer, bloating image #778
Comments
In contrast, the Alpine-based image prevents these dependencies remaining by wrapping them all into a virtual package called php/5.6/alpine3.8/cli/Dockerfile Line 159 in 7838783
Distributions like Debian and Ubuntu using |
Duplicate of #769 (see also #513 #438 #557 #751 #716) Docker Hub reporting 130MB is the compressed size. which is the amount downloaded from the Hub, while 355MB is the on-disk extracted size. On a side note: 5.6 is end of life (https://secure.php.net/supported-versions.php, #768) and was only added back for a security fix (#775) and will likely be removed again soon. The images will still be available to pull, but they will no longer be rebuilt if the base image get updated. |
The Dockerfile installs a bunch of build-time dependencies, apparently for "phpize" and never removes them, this results in a
209MB
layer:Which arguably provides little to no benefit to most users of this image, a lot of people don't use PECL extensions let alone phpize to install them and in our case, we're explicitly installing them with the PECL installer in our own image.
In the odd case someone does want to use phpize, there should be an alternative image with it enabled, instead of pointlessly bloating the base apache image.
For some reason, Docker Hub misreports the image as being
130MB
:But in reality upon pulling it, you find it's actually a whopping
355MB
:I'm guessing a lot of this bloat is due to the completely unnecessary
209MB
layer mentioned.The text was updated successfully, but these errors were encountered: