Is there a way to store information when a container are published ?
I look around lxc config but the namespace user.* are not kept, even description field is ephemeral.
I would like to store the list of profiles used with the container.
I have not found an existing solution to have a “trigger” around the publication such as pre-publish or post-restore.
A solution is to implement a parent script (bash for example) to launch lxc publish/init
Another elegant way is to have an option to call a script before publishing from lxc publish and after lxc init.
I take this opportunity to ask you if there a way to modify by script the container metadata ?
I know I can use use lxc config metadata edit manually but is not usable for a script.
With BTRFS filesystem I can modify the yaml file directly but with ZFS I have to mount/umount container filesystem and I get issues.
I look around lxc config get/set without success.
Is there a undocumented way to do this ? Thank you
LXC offers a good remote API to copy containers between hosts, but I would like to backup/restore containers with images and so keep associated profiles.
May be I’m in a wrong way to manage configured containers with images ?