[diffoscope] Large layers in diffoscope docker image

Mattia Rizzolo mattia at reproducible-builds.org
Mon May 25 12:02:00 UTC 2020


On Sun, May 24, 2020 at 10:28:17AM -0500, Greg Chabala wrote:
> Any idea about which tools might be the worst citizens with regard to disk
> space?

Honestly, I don't.  But start already by thinking that the jdk is pulled
in by something IIRC, and that already is more than 200 MB of compressed
.deb.  It will quickly add up.

> When I tried building the Dockerfile myself, I ran out of disk space; I had
> 9GB free prior to starting. But that's likely because the 'apt-get update'
> and subsequent cleanup are in different layers.

Rather, it's because the final image is compressed.
On a bare debian chroot, trying to install diffoscope leads to:
 * 1095 MB to download
 * 4529 MB of disk space used after unpacking

> I hope that the changes from #104 get implemented, but there's likely more
> to be done. A multi-stage build
> <https://docs.docker.com/develop/develop-images/multistage-build/> might
> help to separate building dependencies from runtime dependencies in the
> final image.

You might be confused by the usage of `apt build-dep`.  Indeed we are
abusing the "build dependencies", but really most of those build deps
are just there for testing and are the same tools used in the end, there
are probably just a couple of such packages that we could remove later
that we aren't (debhelper, etc), but that's really probably very few MB
at most.

-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
More about me:  https://mapreri.org                             : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.reproducible-builds.org/pipermail/diffoscope/attachments/20200525/e374b7cf/attachment.sig>


More information about the diffoscope mailing list