Just noticed this post on HN by Brian Ketelsen @ Microsoft,
Show HN: lxdev: disposable dev envs for Linux with X11/Audio (github.com)
Discussion on HN: https://news.ycombinator.com/item?id=18963772
He introduces a tool called lxdev that can be used to launch LXD containers with specific characteristics.
For example, there is a gui LXD profile that is used to setup a new LXD container that can run GUI programs. Here is a list of the currently provided LXD profiles, https://github.com/bketelsen/lxdev/tree/master/templates
It would be possible to get the same functionality with LXD commands, like
lxc launch ubuntu:18.04 mycontainer --profile default --profile gui
lxdev, you would write instead the following (takes as default the default,gui profiles),
lxdev create mycontainer
I think there is a good need to create preconfigured LXD containers, similar to using Dockerfiles to create custom Docker containers.
lxdev works on this path.