diff --git a/01-basic.sh b/01-basic.sh index 80fc265..f750caf 100644 --- a/01-basic.sh +++ b/01-basic.sh @@ -24,6 +24,7 @@ cp ${SOURCE_DIR}/basic/root/.ssh/authorized_keys /root/.ssh/authorized_keys # Remove default user deluser --remove-all-files user 2>/dev/null + ##### # System boot ##### @@ -52,6 +53,21 @@ update-initramfs -u update-grub +##### +# LXC +##### + +# Install packages +apt-get --no-install-recommends install lxc debootstrap rsync dnsmasq-base xz-utils + +# Configure LXC +cp ${SOURCE_DIR}/basic/etc/default/lxc-net /etc/default/lxc-net +cp ${SOURCE_DIR}/basic/etc/lxc/default.conf /etc/lxc/default.conf + +# Restart services +systemctl start lxc-net lxc + + ##### # Nginx + uWSGI ##### diff --git a/basic/etc/default/lxc-net b/basic/etc/default/lxc-net new file mode 100644 index 0000000..5d52f62 --- /dev/null +++ b/basic/etc/default/lxc-net @@ -0,0 +1 @@ +USE_LXC_BRIDGE="true" diff --git a/basic/etc/lxc/default.conf b/basic/etc/lxc/default.conf new file mode 100644 index 0000000..661718b --- /dev/null +++ b/basic/etc/lxc/default.conf @@ -0,0 +1,4 @@ +lxc.network.type = veth +lxc.network.link = lxcbr0 +lxc.network.flags = up +lxc.network.hwaddr = 00:16:3e:xx:xx:xx