Merge pull request #20281 from cilium-team/fixing-docker-d

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot
2016-02-28 03:51:31 -08:00
6 changed files with 39 additions and 11 deletions

View File

@@ -64,7 +64,7 @@ detect_lsb() {
*64)
;;
*)
echo "Error: We currently only support 64-bit platforms."
echo "Error: We currently only support 64-bit platforms."
exit 1
;;
esac
@@ -100,7 +100,15 @@ detect_lsb() {
# Start the bootstrap daemon
bootstrap_daemon() {
docker -d \
# Detecting docker version so we could run proper docker_daemon command
[[ $(eval "docker --version") =~ ([0-9][.][0-9][.][0-9]*) ]] && version="${BASH_REMATCH[1]}"
local got=$(echo -e "${version}\n1.8.0" | sed '/^$/d' | sort -nr | head -1)
if [[ "${got}" = "${version}" ]]; then
docker_daemon="docker -d"
else
docker_daemon="docker daemon"
fi
${docker_daemon} \
-H unix:///var/run/docker-bootstrap.sock \
-p /var/run/docker-bootstrap.pid \
--iptables=false \
@@ -175,7 +183,7 @@ start_k8s() {
# sleep a little bit
sleep 5
# Start kubelet & proxy in container
# TODO: Use secure port for communication
docker run \
@@ -199,7 +207,7 @@ start_k8s() {
--cluster-domain=cluster.local \
--containerized \
--v=2
docker run \
-d \
--net=host \