On Mon, Feb 17, 2020 at 6:00 PM Nikos Chantziaras <rea...@gmail.com> wrote:
>
> On 17/02/2020 21:46, Rich Freeman wrote:
> >
> > Well, if you decide to play with it I'll offer up:
> > https://rich0gentoo.wordpress.com/2014/07/14/quick-systemd-nspawn-guide/
>
> Hm. I'm too chicken to try it because I'm not sure it does what I think
> it does, but does the "--ephemeral" option pretty much do *exactly* what
> Dale was asking about? Can you start your current "/" as a container
> as-is, emerge packages in it and save them as binaries, then install
> those from the outside, then shutdown the container and all is forgotten?

You know, I think that might actually work.

Note that it depends on reflinks or snapshots for efficient operation,
and I'm not sure what the full list of supported filesystems are.
They do mention btrfs.  I'm not sure if zfs is supported (zfs supports
snapshots but clones would be needed here and those have some
limitations, and zfs does not support reflinks).

You'd obviously have to bind-mount your binary package directory - I
think you could do that even using the same root as this would enable
writes to that one path to escape the mount namespace and get into
your host filesystem.

Obvious way to test this would be to just set up a VM.  It has the
obvious advantage of always being in-sync with your host config.

I think I might actually try playing around with this.  I'm on zfs
though so I'm not sure how it will perform.

-- 
Rich

Reply via email to