After years of research, almost giving up and, lately, much blood, sweat and tears, I have finally succeeded in getting x11 apps fully working in LXD containers. Note that I'm mainly interested in using it for GUI apps on the desktop. I realize that the server gurus have refined its use for years running massive clusters of cloud containers, but that's not what I was after.
There's no one resource I can point everyone to. If I can find the energy and reproduce/remember my steps, I will post a tutorial on what I did.
I have started migrating some of the apps that I used to jail in VMs into LXD containers. At this point, it must still be considered experimental, but early results are promising.
Disadvantages:
- Because of the ultimately insecure nature of x11, containerized apps are not as securely jailed as VMs. Wayland should help on the security front but so far I haven't been able to get LXD to play nicely with Wayland (web sources are even harder to come by).
- The default for LXD is ZFS. This required climbing two steepish learning curves, not just one.
- Can't run Windows. Restricted to running other Linux distros.
- For the average Joe like me, documentation is sparse, highly technical and arcane. I actually gave up a couple of years ago and it took the last three months to finally pin it to the ground.
Advantages:
- Doesn't eat up HDD space like VMs.
- Apps run much faster. In fact, they are almost—if not exactly—at native speed.
- Incredibly efficient with system resources: CPU, RAM, storage, everything.
- Keeps my base install squeaky clean. I've hived off both WINE and Steam into containers where they can drag in all the 32-bit libraries they want and not pollute my base install.
- Ditto with PPAs.
- Once you get over the ZFS learning curve, snapshots and clones are awesome.
I'd love to hear from anyone else who has this set up and running on their desktop. Especially with respect to tweaks and pitfalls to avoid.
Bookmarks