guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building container images with nix2container


From: Antoine Eiche
Subject: Re: Building container images with nix2container
Date: Mon, 26 Feb 2024 11:09:21 +0100

Ricardo Wurmus <rekado@elephly.net> writes:

> We have "guix pack" as part of Guix.  It builds Docker or squashfs
> images as well as various other formats.  What does nix2container offer
> beyond what we have?

I acutally don't know how you currently build Docker images. But if
nix2container brings something, i think it would mainly be
optimizations (time and space).

Does your built images contains several layers?

nix2container uses an heuristic to group store paths into layers. The
goal is to share common layers between images and to avoid full image
rebuild when only a storepath differs.

Do you write the image tarball into your store when you build an image?

nix2container is able to build layers on the fly from the Nix store. The
goal is to reduce IOs and storage. Instead of writing an image tarball
into the store, it generates a script which stream layers from store
paths to the destination (a Docker registry, the Docker deamon, Podman
or a file).

nix2container also has more advanced features allowing to control the
layers that are rebuilt. For instance, if you work on a Python
application, nix2container would allow to isolate your application and
the Python libraries into dedicated layers. When you change something in
your application, the layers containing the Python libraries won't have
to be rebuilt and pushed to a registry.

lewo.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]