Docker-Compose安装

https://github.com/docker/compose/releases

[root@server8 /]# sudo curl -L https://github.com/docker/compose/releases/download/1.25.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

 

1、设置docker设置国内镜像源

创建或修改 /etc/docker/daemon.json 文件,修改为如下形式
# vi /etc/docker/daemon.json


{
  "registry-mirrors": ["http://hub-mirror.c.163.com"]
}

 

2、重启docker容器

[root@server8 /]# systemctl restart docker.service


3、设置执行权限
[root@server8 /]# sudo chmod +x /usr/local/bin/docker-compose


4、完成安装(查看docker-compose版本)
docker-compose version


国内加速地址有:
Docker中国区官方镜像
https://registry.docker-cn.com
 
网易
http://hub-mirror.c.163.com
 
ustc 
https://docker.mirrors.ustc.edu.cn
 
中国科技大学
https://docker.mirrors.ustc.edu.cn
 
阿里云容器  服务
https://cr.console.aliyun.com/
首页点击“创建我的容器镜像”  得到一个专属的镜像加速地址,类似于“https://1234abcd.mirror.aliyuncs.com”

原文地址:https://www.cnblogs.com/lwx57280/p/12082561.html