Installation
apt install -y bridge-utils debootstrap lxc-templates lxchttp://www.panticz.de/install_lxc
Create container
export LANG=en_US.UTF-8
export CONTAINER=wheezy
sudo sudo lxc-destroy -n ${CONTAINER}
sudo lxc-create -t debian -n ${CONTAINER}
sudo lxc-start -d -n ${CONTAINER}
echo 'Acquire::http::Proxy "http://apt-cacher:3142/";' | sudo tee /var/lib/lxc/${CONTAINER}/rootfs/etc/apt/apt.conf
sudo lxc-attach -n ${CONTAINER} -- apt-get clean
sudo lxc-attach -n ${CONTAINER} -- apt-get update
sudo lxc-attach -n ${CONTAINER} -- apt-get dist-upgrade -y
sudo lxc-attach -n ${CONTAINER} -- apt-get install -y wget vim
# start container in forderground
lxc-start -n vm1 -F
# optional
echo "lxc.start.auto = 1" | tee -a /var/lib/lxc/${CONTAINER}/config
# connect to container
ssh root@$(sudo lxc-info -i -H -n ${CONTAINER})Install LXC from testing on Debian
echo "deb http://ftp.debian.org/debian testing main" >> /etc/apt/sources.list.d/testing.list
apt-get update
apt-get -t testing install -y lxc
sed -i 's|lxc.network.type = empty|lxc.network.type = veth|' /etc/lxc/default.conf
echo "lxc.network.link = lxcbr0" >> /etc/lxc/default.confUpdate LXC container templates
wget -q --no-check-certificate https://raw.githubusercontent.com/panticz/lxc/master/scripts/lxc-update-templates.sh -O - | sudo bash -
# required for fedora container
sudo apt-get install -y yum curlOPTIONAL: install wget and vim by default under debian
sed -i '/iproute/a wget,\\\nvim,\\' /usr/share/lxc/templates/lxc-debianOPTIONAL: enable apt-cache