To create an unprivileged Linux Containers (LXC) container on Ubuntu Linux 14.04 LTS, you can follow these steps:
lxc
package, which provides the tools needed to manage LXC containers:sudo apt-get update sudo apt-get install lxc
sudo addgroup --system lxc sudo adduser --system --ingroup lxc lxc
This will create the lxc
user and group, which will be used to run the unprivileged container.
lxc-create
command. Replace container
with the desired name for the container:sudo lxc-create -n container -t download -- --dist ubuntu --release trusty --arch amd64
This will create a new container called container
using the Ubuntu 14.04 LTS (Trusty Tahr) release.
lxc-start
command:sudo lxc-start -n container
lxc-attach
command:sudo lxc-attach -n container
This will open a console session in the container.