[lxc-users] How to run scripts when container is destroyed?

Serge Hallyn serge.hallyn at ubuntu.com
Tue May 12 01:59:35 UTC 2015


Quoting ������ (sungbae.yoo at samsung.com):
> Hi,
> 
>  
> 
> I¡¯m making a template script for container.
> 
> I want to install some packages when container is created and uninstall the
> packages when container is destroyed.
> 
>  
> 
> The former can be resolved simply by insert package command into template.
> 
> How to resolve the latter? Is there no way to insert any hook script in
> destroy?

Nope, there is currently no lxc.hook.destroy.  A patch to add it
would be welcome as a conversation piece, though we'd have to
think about it to decide whether it makes sense.  I think it might.


More information about the lxc-users mailing list