Merge pull request #24 from leebaok/lxcfs

[lxcfs] add lxcfs support for docklet
This commit is contained in:
leebaok 2016-04-06 14:54:24 +08:00
commit 4b4a1fd455
3 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,9 @@
#!/bin/sh
# $1 : name of container ( name in lxc-start with -n)
# $2 : net
# $3 : network flags, up or down
# $4 : network type, for example, veth
# $5 : value of lxc.network.veth.pair
ovs-vsctl --if-exists del-port $Bridge $5

View File

@ -5,4 +5,12 @@
# $3 Section (always 'lxc').
# $4 The hook type (i.e. 'clone' or 'pre-mount').
# following environment variables are set by lxc :
# $LXC_NAME: is the container's name.
# $LXC_ROOTFS_MOUNT: the path to the mounted root filesystem.
# $LXC_CONFIG_FILE: the path to the container configuration file.
# $LXC_SRC_NAME: in the case of the clone hook, this is the original container's name.
# $LXC_ROOTFS_PATH: this is the lxc.rootfs entry for the container.
# Note this is likely not where the mounted rootfs is to be found, use LXC_ROOTFS_MOUNT for that.
echo $HNAME > $LXC_ROOTFS_PATH/etc/hostname

View File

@ -27,7 +27,7 @@ fi
# install packages that docklet needs (in ubuntu)
# some packages' name maybe different in debian
apt-get install -y cgmanager lxc lvm2 bridge-utils curl exim4 openssh-server openvswitch-switch
apt-get install -y cgmanager lxc lxcfs lxc-templates lvm2 bridge-utils curl exim4 openssh-server openvswitch-switch
apt-get install -y python3 python3-netifaces python3-flask python3-flask-sqlalchemy python3-pampy
apt-get install -y python3-psutil
apt-get install -y python3-lxc