-
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
fix: trash PHP sources after build to reduce image size #886
fix: trash PHP sources after build to reduce image size #886
Conversation
So... what about php/Dockerfile-debian.template Line 190 in a06f431
|
https://github.com/docker-library/php/blob/master/docker-php-source#L4
A more appropriate fix could be "Regression" is also visible there (I inherit from official image), since 7.2.19 https://hub.docker.com/r/bdossantos/php-lol/tags |
Closing as duplicate of #488. Also, I see no size difference in the two: $ docker pull php:7.2.22-fpm-buster
7.2.22-fpm-buster: Pulling from library/php
1ab2bdfe9778: Pull complete
1448c64389e0: Pull complete
4b8a4e62b444: Pull complete
9eb9d1e8e241: Pull complete
1ea1192f8448: Pull complete
ec5a150f7008: Pull complete
f39d8e1e9c06: Pull complete
ec9ce5c6ea3e: Pull complete
dab566ec6646: Pull complete
d978f8b39145: Pull complete
4a364e7ada90: Pull complete
Digest: sha256:43868cbbdb154b8984a563201bab31b0165f95a5816a47b5d6206ecd1aa27a84
Status: Downloaded newer image for php:7.2.22-fpm-buster
docker.io/library/php:7.2.22-fpm-buster
$ docker pull php:7.2.20-fpm-buster
7.2.20-fpm-buster: Pulling from library/php
f5d23c7fed46: Pull complete
4f36b8588ea0: Pull complete
6f4f95ddefa8: Pull complete
187af28c9b1d: Pull complete
e0725e1eb209: Pull complete
304248ba6ef5: Pull complete
1b794fb649f1: Pull complete
10db73209341: Pull complete
7e72f23fca95: Pull complete
adb83d02e947: Pull complete
8da286a4ed1e: Pull complete
Digest: sha256:d989a4e0f16bde44d1fc2707336f2f8d68da1e016140d1b0efcad7d0acdfca97
Status: Downloaded newer image for php:7.2.20-fpm-buster
docker.io/library/php:7.2.20-fpm-buster
$ docker image ls php
REPOSITORY TAG IMAGE ID CREATED SIZE
php 7.2.22-fpm-buster 8bbd5f15e775 2 days ago 400MB
php 7.2.20-fpm-buster 624d2c6f6bdd 6 weeks ago 400MB If you are talking about $ docker image ls php
REPOSITORY TAG IMAGE ID CREATED SIZE
php 7.2.22-fpm-stretch cb4074407379 2 days ago 367MB
php 7.2.22-fpm-buster 8bbd5f15e775 2 days ago 400MB
php 7.2.20-fpm-buster 624d2c6f6bdd 6 weeks ago 400MB
php 7.2.20-fpm-stretch f9738c3d4df5 7 weeks ago 366MB
php 7.2.19-fpm 715ebd6c8c4d 2 months ago 371MB
php 7.2.19-fpm-stretch 715ebd6c8c4d 2 months ago 371MB |
See PHP base image docker-library/php#886
See PHP base image docker-library/php#886
Hi there,
Since two minor versions I have the impression that the PHP image based on Debian has taken a little weight (~ 20MB wasted space) ...
I looked in the layers of the images with
dive
(https://github.com/wagoodman/dive) and noticed that PHP sources are no longer purged at the end of the build.dive php:7.2.22-fpm-buster
dive php:7.2.20-fpm-buster
You will find a potential fix attached to this PR (on the other hand I have not yet been able to test it thoroughly).
Thank you.