In addition, there is a gradual shift (almost completed?) to using distrobuilder to create container images. LXD’s container images will be created using distrobuilder.
With distrobuilder, you use a configuration file like
with is versatile enough to help you insert additional functionality to the container image.
I have written two posts on distrobuilder (The LXD tutorials of Simos).