Last active
February 20, 2019 04:38
-
-
Save knknkn1162/8060d2edaa9e16882259196540ce92df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Assume that | |
## DEBIAN=/usr/local/lib/lxc/debian01 | |
## ROOTFS=${DEBIAN}/rootfs | |
$ tail -n +1 ${DEBIAN}/config ${ROOTFS}/etc/inittab ${ROOTFS}/etc/network/interfaces ${ROOTFS}/etc/hostname | |
==> /usr/local/lib/lxc/debian01/config <== | |
lxc.network.type=veth | |
lxc.network.link=br0 | |
lxc.network.flags=up | |
lxc.tty = 4 | |
lxc.pts = 1024 | |
lxc.rootfs = /usr/local/lib/lxc/debian01/rootfs | |
lxc.cgroup.devices.deny = a | |
# /dev/null and zero | |
lxc.cgroup.devices.allow = c 1:3 rwm | |
lxc.cgroup.devices.allow = c 1:5 rwm | |
# consoles | |
lxc.cgroup.devices.allow = c 5:1 rwm | |
lxc.cgroup.devices.allow = c 5:0 rwm | |
lxc.cgroup.devices.allow = c 4:0 rwm | |
lxc.cgroup.devices.allow = c 4:1 rwm | |
# /dev/{,u}random | |
lxc.cgroup.devices.allow = c 1:9 rwm | |
lxc.cgroup.devices.allow = c 1:8 rwm | |
lxc.cgroup.devices.allow = c 136:* rwm | |
lxc.cgroup.devices.allow = c 5:2 rwm | |
# rtc | |
lxc.cgroup.devices.allow = c 254:0 rwm | |
# mounts point | |
lxc.mount.entry=proc /usr/local/lib/lxc/debian01/rootfs/proc proc nodev,noexec,nosuid 0 0 | |
lxc.mount.entry=sysfs /usr/local/lib/lxc/debian01/rootfs/sys sysfs defaults 0 0 | |
==> /usr/local/lib/lxc/debian01/rootfs/etc/inittab <== | |
id:3:initdefault: | |
si::sysinit:/etc/init.d/rcS | |
l0:0:wait:/etc/init.d/rc 0 | |
l1:1:wait:/etc/init.d/rc 1 | |
l2:2:wait:/etc/init.d/rc 2 | |
l3:3:wait:/etc/init.d/rc 3 | |
l4:4:wait:/etc/init.d/rc 4 | |
l5:5:wait:/etc/init.d/rc 5 | |
l6:6:wait:/etc/init.d/rc 6 | |
# Normally not reached, but fallthrough in case of emergency. | |
z6:6:respawn:/sbin/sulogin | |
1:2345:respawn:/sbin/getty 38400 console | |
c1:12345:respawn:/sbin/getty 38400 tty1 linux | |
c2:12345:respawn:/sbin/getty 38400 tty2 linux | |
c3:12345:respawn:/sbin/getty 38400 tty3 linux | |
c4:12345:respawn:/sbin/getty 38400 tty4 linux | |
==> /usr/local/lib/lxc/debian01/rootfs/etc/network/interfaces <== | |
auto lo | |
iface lo inet loopback | |
auto eth0 | |
iface eth0 inet dhcp | |
==> /usr/local/lib/lxc/debian01/rootfs/etc/hostname <== | |
debian01 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment