Install LXC in 01-basic.sh
This commit is contained in:
parent
567443260c
commit
63f4e212cb
16
01-basic.sh
16
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
|
||||
#####
|
||||
|
1
basic/etc/default/lxc-net
Normal file
1
basic/etc/default/lxc-net
Normal file
@ -0,0 +1 @@
|
||||
USE_LXC_BRIDGE="true"
|
4
basic/etc/lxc/default.conf
Normal file
4
basic/etc/lxc/default.conf
Normal 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
|
Loading…
Reference in New Issue
Block a user