docker 脚本
#!/bin/bash
echo "电脑信息"
sleep 5
uname -a
echo "yum更新完成"
sleep 5
yum -y update
echo "安装需要的包"
sleep 5
yum install -y yum-utils device-mapper-persistent-data lvm2
echo "设置yum源中央仓库"
sleep 5
yum-config-manager --add-repo http://download.docker.com/linux/centos/docker-ce.repo
echo "可以查看所有仓库中所有docker版本,并选择特定版本安装"
sleep 5
yum list docker-ce --showduplicates | sort -r
echo "安装docker"
sleep 5
yum install -y docker-ce-18.03.1.ce
echo "启动docker"
sleep 5
systemctl start docker
echo "docker启动成功!docker启动成功!docker启动成功!docker启动成功!docker启动成功!docker启动成功!"