可乐博客

ali源安装docker

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

yum clean all
yum makecache


yum install -y wget vim iputils-ping net-tools psmisc nmap-ncat.x86_64 tcpdump telnet lrzsz unzip zip



sudo yum install -y yum-utils device-mapper-persistent-data lvm2

sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
sudo yum makecache fast
sudo yum -y install docker-ce

systemctl start docker
systemctl enable docker


sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://fzhifedh.mirror.aliyuncs.com"]
}

EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

docker pull
随笔