crude pip caching, remove no-op fstab
This commit is contained in:
parent
1bbd9e01df
commit
5f6c93b1fc
1 changed files with 6 additions and 15 deletions
21
build_lxc.sh
21
build_lxc.sh
|
@ -13,16 +13,6 @@ COPYENV=${COPYENV:-1}
|
||||||
lxc-stop -n $CONTAINER
|
lxc-stop -n $CONTAINER
|
||||||
lxc-destroy -n $CONTAINER
|
lxc-destroy -n $CONTAINER
|
||||||
|
|
||||||
FSTAB=/tmp/fstab
|
|
||||||
cat > $FSTAB <<EOF
|
|
||||||
none /var/lib/lxc/$CONTAINER/dev/pts devpts defaults 0 0
|
|
||||||
none /var/lib/lxc/$CONTAINER/proc proc defaults 0 0
|
|
||||||
none /var/lib/lxc/$CONTAINER/sys sysfs defaults 0 0
|
|
||||||
none /var/lib/lxc/$CONTAINER/var/lock tmpfs defaults 0 0
|
|
||||||
none /var/lib/lxc/$CONTAINER/var/run tmpfs defaults 0 0
|
|
||||||
/var/cache/apt/ $APTCACHEDIR none bind 0 0
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# Create network configuration
|
# Create network configuration
|
||||||
NET_CONF=/tmp/net.conf
|
NET_CONF=/tmp/net.conf
|
||||||
cat > $NET_CONF <<EOF
|
cat > $NET_CONF <<EOF
|
||||||
|
@ -30,7 +20,6 @@ lxc.network.type = veth
|
||||||
lxc.network.link = $BRIDGE
|
lxc.network.link = $BRIDGE
|
||||||
lxc.network.flags = up
|
lxc.network.flags = up
|
||||||
lxc.network.ipv4 = $CONTAINER_CIDR
|
lxc.network.ipv4 = $CONTAINER_CIDR
|
||||||
lxc.mount = $FSTAB
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Configure the network
|
# Configure the network
|
||||||
|
@ -80,12 +69,14 @@ cat > $RC_LOCAL <<EOF
|
||||||
/root/install.sh
|
/root/install.sh
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Setup apt cache
|
# Setup cache
|
||||||
# FIXME - use proper fstab mount
|
# FIXME - use proper fstab mount
|
||||||
CWD=`pwd`
|
CWD=`pwd`
|
||||||
APTCACHEDIR=$CWD/cache/apt
|
CACHEDIR=$CWD/cache/
|
||||||
mkdir -p $APTCACHEDIR
|
mkdir -p $CACHEDIR/apt
|
||||||
cp -pr $APTCACHEDIR/* $ROOTFS/var/cache/apt/
|
mkdir -p $CACHEDIR/pip
|
||||||
|
cp -pr $CACHEDIR/apt/* $ROOTFS/var/cache/apt/
|
||||||
|
cp -pr $CACHEDIR/pip/* $ROOTFS/var/cache/pip/
|
||||||
|
|
||||||
# Configure cgroup directory
|
# Configure cgroup directory
|
||||||
mkdir -p /cgroup
|
mkdir -p /cgroup
|
||||||
|
|
Loading…
Reference in a new issue