We should have started linking against base image versions of zlib and PCRE long ago. We are specifically linking against libpcre3 (8.x), because some regex rules have changed in the newer libpcre2 (10.x).
Also now stripping the nginx binary (but obviously not nginx-debug).
In total, we get a reasonable size reduction:
Before:
% ls -la nginx-heroku-2*.tgz
-rw-r--r-- 1 dzuelke staff 5638356 May 17 13:50 nginx-heroku-20.tgz
-rw-r--r-- 1 dzuelke staff 4559004 May 17 13:50 nginx-heroku-22.tgz
% tar tzvf nginx-heroku-20.tgz
-rw-r--r-- 0 root root 5349 Feb 21 01:58 ./mime.types
-rwxr-xr-x 0 root root 6705408 Feb 21 01:58 ./nginx
-rwxr-xr-x 0 root root 6870296 Feb 21 01:58 ./nginx-debug
% tar tzvf nginx-heroku-22.tgz
-rw-r--r-- 0 root root 5349 Feb 21 02:00 ./mime.types
-rwxr-xr-x 0 root root 4937400 Feb 21 02:00 ./nginx
-rwxr-xr-x 0 root root 5094584 Feb 21 02:00 ./nginx-debug
After:
% ls -la nginx-heroku-2*.tgz
-rw-r--r-- 1 dzuelke staff 3181649 May 17 13:51 nginx-heroku-20.tgz
-rw-r--r-- 1 dzuelke staff 2638964 May 17 13:51 nginx-heroku-22.tgz
% tar tzvf nginx-heroku-20.tgz
-rw-r--r-- 0 root root 5349 May 17 13:30 ./mime.types
-rwxr-xr-x 0 root root 973624 May 17 13:30 ./nginx
-rwxr-xr-x 0 root root 6746392 May 17 13:30 ./nginx-debug
% tar tzvf nginx-heroku-22.tgz
-rw-r--r-- 0 root root 5349 May 17 13:30 ./mime.types
-rwxr-xr-x 0 root root 973592 May 17 13:30 ./nginx
-rwxr-xr-x 0 root root 4974032 May 17 13:30 ./nginx-debug
We should have started linking against base image versions of zlib and PCRE long ago. We are specifically linking against
libpcre3
(8.x), because some regex rules have changed in the newerlibpcre2
(10.x).Also now stripping the
nginx
binary (but obviously notnginx-debug
).In total, we get a reasonable size reduction:
Before:
After:
GUS-W-15794944