curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
sudo systemctl start docker //启动docker
docker -v //查看版本号
docker info //查看docker详情
vi /etc/docker/daemon.json
{
"registry-mirrors": ["https://0cec187b820010c90f58c00bf2f1d6a0.mirror.swr.myhuaweicloud.com"]
}
sudo systemctl daemon-reload
sudo systemctl restart docker
三、卸载docker
# 查询安装的docker包
yum list installed | grep docker
yum remove docker-ce.x86_64 ddocker-ce-cli.x86_64 -y
rm -rf /var/lib/docker
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose