[lxc-users] How to run scripts when container is destroyed?
Michael H. Warfield
mhw at WittsEnd.com
Tue May 12 14:23:05 UTC 2015
On Tue, 2015-05-12 at 01:59 +0000, Serge Hallyn wrote:
> Quoting ������ (sungbae.yoo at samsung.com):
> > Hi,
> >
> >
> >
> > Im 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.
I concur it might. I could envision some sort of external registry or
interface that could be signaled of a "destroy" event and update
accordingly.
Regards,
Mike
--
Michael H. Warfield (AI4NB) | (770) 978-7061 | mhw at WittsEnd.com
/\/\|=mhw=|\/\/ | (678) 463-0932 | http://www.wittsend.com/mhw/
NIC whois: MHW9 | An optimist believes we live in the best of all
PGP Key: 0x674627FF | possible worlds. A pessimist is sure of it!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 465 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20150512/f4320f94/attachment.sig>
More information about the lxc-users
mailing list