i am wanting to do roughly this kind of thing on my laptop. that means i want to use the actual hardware. my intention for containers is to have one for Ubuntu desktop and another for Ubuntu server, multiplied by as many versions as i want to keep (typically 2 or 3). these will be maintained reference containers doing nothing more than regular upgrades to stay up to date. then there will be production containers for various things to do with as much of the system files accessed in read-only mode (mounted R/O view of the reference container, if i can, else copied files). one of the production containers is where i will need to run Xorg. so it will need access to the hardware in the way Xorg does that, which i know nothing about (so i am tempted to try strace of Xorg to see what it does).
the idea of R/O everything is for safer operation and usage. no accidental overwrites of system files. FYI, i keep all my files in my home directories in R/O. i’ve done this for decades (since my mainframe days). i have run R/O systems before using R/O optical media. i think containers can make this better if the Xorg issue can be resolved (though for servers, it’s a non-issue).
the reference containers is where i will do apt-get and other distribution upgrades. new versions will go in new containers. i’ll probably need to write an installer script to initialize the version of Ubuntu into the empty container.
the host system will be minimal, just barely enough to bring up the containers and let me admin it via VTY (no sshd, no network listeners). i do not want to run Xorg directly on the host though i may have to do that for a while.
can this concept be run under LXD? or partly under LXD (such as the production containers), or will i need LXC? where should i try to get Xorg running?