[systemd-devel] How to create minimal portable services environments?

Steve Dodd steved424 at gmail.com
Wed Aug 29 15:31:24 UTC 2018


On 29 August 2018 at 16:14, Wojtek Swiatek <w at swtk.info> wrote:
> Le mer. 29 août 2018 à 17:11, Steve Dodd <steved424 at gmail.com> a écrit :

>> Shouldn't be that hard to adapt one of the above for nspawn?

> nspawn is not the problem - portable services are. I use a minimal image
> with nspawn which is OK but portable services are intended to be even
> thinner: no need to bring in the OS, just the files needed to run the
> service (which are the program itself, dependencies not found in the host
> and unit files)

My bad, portable services are lumped in with nspawn in my head :)

Dependencies will still need duplicating in an image though, as even a
portable service will be chrooted and therefore need its own copy of
its libraries. Hence my remark about page cache sharing. The /usr
merge process and the possibility of read-only root host filesystems
mentioned in various systemd docs suggests it may one day be
possible/sane for containers to share /usr or even / ..

S.


More information about the systemd-devel mailing list