diff --git a/cluster/centos/build.sh b/cluster/centos/build.sh index 165963b8bd1..06ac2131e90 100755 --- a/cluster/centos/build.sh +++ b/cluster/centos/build.sh @@ -52,8 +52,8 @@ function download-releases() { echo "Download kubernetes release v${K8S_VERSION} ..." curl -L ${K8S_DOWNLOAD_URL} -o ${RELEASES_DIR}/kubernetes.tar.gz - echo "Download docker-latest ..." - curl -L https://get.docker.com/builds/Linux/x86_64/docker-latest.tgz -o ${RELEASES_DIR}/docker.tar.gz + echo "Download docker release v${DOCKER_VERSION} ..." + curl -L ${DOCKER_DOWNLOAD_URL} -o ${RELEASES_DIR}/docker.tar.gz } function unpack-releases() { @@ -95,6 +95,7 @@ function unpack-releases() { cp ${RELEASES_DIR}/kubernetes/server/kubernetes/server/bin/kubectl ${BINARY_DIR} fi + # docker if [[ -f ${RELEASES_DIR}/docker.tar.gz ]]; then tar xzf ${RELEASES_DIR}/docker.tar.gz -C ${RELEASES_DIR} diff --git a/cluster/centos/config-build.sh b/cluster/centos/config-build.sh index 087d2807de5..d9a67fd58f3 100755 --- a/cluster/centos/config-build.sh +++ b/cluster/centos/config-build.sh @@ -19,6 +19,9 @@ # Directory to store release packages that will be downloaded. RELEASES_DIR=${RELEASES_DIR:-/tmp/downloads} +# Define docker version to use. +DOCKER_VERSION=${DOCKER_VERSION:-"1.12.0"} + # Define flannel version to use. FLANNEL_VERSION=${FLANNEL_VERSION:-"0.5.5"} @@ -28,6 +31,9 @@ ETCD_VERSION=${ETCD_VERSION:-"3.0.4"} # Define k8s version to use. K8S_VERSION=${K8S_VERSION:-"1.3.5"} +DOCKER_DOWNLOAD_URL=\ +"https://get.docker.com/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz" + FLANNEL_DOWNLOAD_URL=\ "https://github.com/coreos/flannel/releases/download/v${FLANNEL_VERSION}/flannel-${FLANNEL_VERSION}-linux-amd64.tar.gz" diff --git a/cluster/centos/node/scripts/docker.sh b/cluster/centos/node/scripts/docker.sh index 839d29bc70f..55ceacea419 100755 --- a/cluster/centos/node/scripts/docker.sh +++ b/cluster/centos/node/scripts/docker.sh @@ -35,7 +35,7 @@ Type=notify EnvironmentFile=-/run/flannel/docker EnvironmentFile=-/opt/kubernetes/cfg/docker WorkingDirectory=/opt/kubernetes/bin -ExecStart=/opt/kubernetes/bin/docker daemon \$DOCKER_OPT_BIP \$DOCKER_OPT_MTU \$DOCKER_OPTS +ExecStart=/opt/kubernetes/bin/dockerd \$DOCKER_OPT_BIP \$DOCKER_OPT_MTU \$DOCKER_OPTS LimitNOFILE=1048576 LimitNPROC=1048576