提交 c3d31429 编写于 作者: D dlorenc 提交者: GitHub

Merge pull request #241 from dlorenc/persist

Make the /var/lib/localkube directory persistent.
......@@ -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.
......
#!/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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册