modularize container LXC logic