I just want to know dose the Linux containers (LXD) provide security?
Such that if on container get infected with a virus will that effect the entire system (kernel+other containers) Or it will effect just that container ?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
As with all packages, LXC has had security issues, see Where are lxc containers security borderlines?
There are vulnerabilities reported with some regularity - http://www.ubuntu.com/search?q=LXC+USN
Basically, in a nut shell, as LXC uses the host kernel, any kernel vulnerabilities will exist in LXC as well.
IMHO you should confine your containers with apparmor. https://help.ubuntu.com/12.04/serverguide/apparmor.html
Otherwise, IMHO, your question is quite broad.
It will affect just the container as the container will run having its own namespaces:
Unless a vulnerability has the ability to break out of this namespace boundary to get into the host system, it won't affect the host system by any means.
Note that, in the past, several vulnerabilities were discovered in
lxc, so you should look out for
lxc related CVEs regularly to be on the safer side.
Also, as an extra layer of security
apparmor for resource confinement, the relevant AppArmor profiles are defined in