Install LXC in 01-basic.sh

This commit is contained in:
Disassembler 2017-08-31 19:45:00 +02:00
parent 567443260c
commit 63f4e212cb
3 changed files with 21 additions and 0 deletions

View File

@ -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
#####

View File

@ -0,0 +1 @@
USE_LXC_BRIDGE="true"

View File

@ -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