-
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
Remove php src the right way for lightweight containers. #245
Conversation
&& mv "/usr/src/php-$PHP_VERSION" /usr/src/php \ | ||
&& rm "$PHP_FILENAME" \ | ||
&& docker-php-source download \ | ||
&& docher-php-source extract \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be docker-php-source extract \
@cjunge thx for noticing me the typo... 🙀 |
To simplify this I would rather leave the downloading in the Dockerfile and keep the tar.gz file around. This will make the new script only need to do two things, extract and delete. This will also guarantee that any source compiled against in your modules is the same that built the version of php in use and lessen the impact on php servers as well as time on users. How much time does the extraction and deletion add to a typical This also has ramifications on the |
@yosifkit ok, will make the changes soon & report numbers about extract/delete times. |
ping @yosifkit ok done. About
The only last possible improvement I see is... if somebody decide in its inherited Dockerfile RUN to call manually at the beginning I will make some benchmark about the extra consumed time by extract process. |
@yosifkit benchmark done... on my local machine the extract step is very fast: time tar -Jxf "/$PHP_FILENAME" -C /usr/src
real 0m 3.10s
user 0m 1.53s
sys 0m 2.48s
time rm -rf /usr/src/php
real 0m 0.52s
user 0m 0.04s
sys 0m 0.48s I think we can go with this PR as is, I let you review prior to run update.sh & merge it. |
👍 |
Fixes #234.
update.sh
after the proposed patch have been reviewed.According to @yosifkit #234 (comment) we should obtain that kind of result (uncompressed size container images):