centos安装docker-ce shell脚本

#!/bin/bash
yum -y install bc
kenel=`uname -r`
kenel=`echo ${kenel:0:3}`
if [ $(echo "${kenel} >= 3.10" | bc) = 1 ];then
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum makecache fast
sudo yum -y install docker-ce
sudo systemctl start docker
sudo systemctl enable docker
else
echo "内核版本太低,请您升级内核版本"
fi

posted @ 2017-04-25 08:40  人艰不拆_zmc  阅读(794)  评论(0编辑  收藏  举报