tardelta – Generate a tarball of differences between two tarballs

I’ve created a utility called tardelta (ebuild available) that people using containers may be interested in. Here’s the README:

It is possible to optimize docker containers such that multiple containers are based off of a single copy of a common base image. If containers are constructed from tarballs, then it can be useful to create a delta tarball which contains the differences between a base image and a derived image. The delta tarball can then be layered on top of the base image using a Dockerfile like the following:

FROM base
ADD delta.tar.xz /

Many different types of containers can thus be derived from a common base image, while sharing a single copy of the base image. This saves disk space, and can also reduce memory consumption since it avoids having duplicate copies of base image data in the kernel’s buffer cache.

2 thoughts on “tardelta – Generate a tarball of differences between two tarballs”

  1. It would be nice to create tarbals directly from gentoo system using dependencies stored in the portage by providing the list of binaries which should be stored in the tarball.
    Portage contains the list of all libraries needed by the binary to run. And I think, with this method the tarballs would be much smaller, than pulling the whole debian, or ubuntu.

    1. It would be nice to create tarbals directly from gentoo system using dependencies stored in the portage by providing the list of binaries which should be stored in the tarball.

      Sure, the preserve-libs code does similar dependency calculations for binaries.

      Portage contains the list of all libraries needed by the binary to run. And I think, with this method the tarballs would be much smaller, than pulling the whole debian, or ubuntu.

      You might have to include some of the other files that were installed with the binaries. You can use exclusion patterns to filter out non-essential bulky files.

Comments are closed.