Store information in published container?


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.

Thanks for your help ;o)

lxc config metadata edit will let you set properties that will be part of the image when published.

1 Like

less useful than lxc config set/get but it does the job !

Thanks a lot ;o)

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.

Is there an existing solution?