Skip to content
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

Reduce image size by removing the php source #1043

Closed
wants to merge 1 commit into from
Closed

Reduce image size by removing the php source #1043

wants to merge 1 commit into from

Conversation

fabiang
Copy link

@fabiang fabiang commented Jul 28, 2020

Hello,

I've reduced the size of all images by around 10 MB by removing the source code of PHP after compiling it.

To download and delete and the source code again I've added the sub-commands download and delete-download to docker-php-source script, which are called when docker-php-source extract and docker-php-source delete are executed. This allows docker-php-ext-install to work as before.

Possible BC breaks:

  1. Installs through pecl
  2. Compiling extension directly
  3. environment variable PHP_URL was removed

For 1. and 2. docker-php-source download must called before and docker-php-source delete-download for cleanup must be called after.

Of cause the overall build time of the php images increased for most people, but should be acceptable.

I've a quite complex image based on this PHP images and it could be build without problems, so I guess most people won't even notice.

@tianon
Copy link
Member

tianon commented Jul 28, 2020

This is technically a duplicate of #488, although I think #886 has more useful discussion in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants