yum -y install wget
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo
yum clean all
yum makecache
yum -y update
yum -y install vim
yum -y install unzip zip
yum -y install lrzsz
yum -y install yum-utils
yum -y install device-mapper-persistent-data
yum -y install lvm2
yum -y install epel-release
yum -y install python-pip
pip install –upgrade pip
yum -y remove docker
yum -y remove docker-common
yum -y remove docker-selinux
yum -y remove docker-engine
yum -y install docker-io
groupadd docker
usermod -aG docker $USER
tee -a /etc/sysctl.conf <<-EOF
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
EOF
mkdir -p /etc/docker
tee /etc/docker/daemon.json <<-‘EOF’
{
“registry-mirrors”: [“https://xl95ra1m.mirror.aliyuncs.com”]
}
EOF
sysctl -p
systemctl daemon-reload
systemctl restart docker
pip install -U docker-compose
service docker start
docker run hello-world