Installation

apt-get install lxc

Check compatibility

lxc-checkconfig

Setup

/etc/subuid

root:100000:65536

/etc/subgid

root:100000:65536

/etc/lxc/default.conf

lxc.id_map = u 0 100000 65536
lxc.id_map = g 0 100000 65536
lxc.start.auto = 1
lxc.start.delay = 5

Permissions

chmod +x /var/lib/lxc

Create a new container

lxc-create -n container-name -t download

Useful commands

  • lxc-start
  • lxc-stop
  • lxc-destroy
  • lxc-attach
  • lxc-clone

References