- 首先是官方安装(一般会因为网络原因失败)
https://docs.docker.com/compose/install/
- pip3安装
yum install python3-pip
pip3 install docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose -v
- 加速
镜像拉取一直报错:
Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
- 解决方法:
vi /etc/docker/daemon.json
{
"registry-mirrors": ["https://registry.docker-cn.com"]
}
- 重启docker
systemctl daemon-reload
systemctl restart docker
访问
https://www.daocloud.io/mirror