rm /etc/docker/daemon.json
mkdir /etc/docker
echo '{
    "registry-mirrors" : [
      "https://docker.mirrors.ustc.edu.cn",
      "https://registry.docker-cn.com",
      "http://hub-mirror.c.163.com"
  ],
  "log-opts": {"max-size":"100m", "max-file":"3"}
}' > /etc/docker/daemon.json
sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine
sudo yum install -y yum-utils
sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install -y docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
sudo systemctl enable docker
sudo mv docker-compose-Linux-x86_64 /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose