Make the /var/lib/localkube directory persistent.

pull/241/head
dlorenc 2016-06-28 13:43:34 -07:00
parent 3380a56971
commit 1a8621a4d4
2 changed files with 24 additions and 0 deletions

View File

@ -25,6 +25,8 @@ ADD nsenter $ROOTFS/usr/bin/
ADD socat $ROOTFS/usr/bin
ADD ethtool $ROOTFS/usr/bin
ADD conntrack $ROOTFS/usr/bin
ADD bootlocal.sh $ROOTFS/tmp/bootlocal.sh
RUN cat $ROOTFS/tmp/bootlocal.sh >> $ROOTFS/etc/rc.d/automount
# Get a specific version of Docker. This will overwrite the binary installed
# in the base image.

22
deploy/iso/bootlocal.sh Normal file
View File

@ -0,0 +1,22 @@
#!/bin/bash
# Copyright 2016 The Kubernetes Authors All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Setup a persistent directory for /var/lib/localkube
BOOT2DOCKER_DATA=`blkid -o device -l -t LABEL=boot2docker-data`
PARTNAME=`echo "$BOOT2DOCKER_DATA" | sed 's/.*\///'`
mkdir -p /mnt/$PARTNAME/var/lib/localkube
ln -s /mnt/$PARTNAME/var/lib/localkube /var/lib/localkube