linux终端下载docker-compose命令
前提:使用github加速,环境:CentOS7 everything版
1、上传fastguthub安装包(可以去GitHub下载)

2、安装fastgithub
[root@localhost ~]# unzip fastgithub_linux-x64.zip #解压fastgithub的压缩包
[root@localhost ~]# cd fastgithub_linux-x64/ #进入目录
[root@localhost fastgithub_linux-x64]# ls
appsettings appsettings.json dnscrypt-proxy fastgithub LICENSE README.html README.md
[root@localhost fastgithub_linux-x64]# nohup ./fastgithub & #脱离终端,放入后台运行
[1] 7322
[root@localhost fastgithub_linux-x64]# tail -f nohup.out
已监听http://localhost:38457,http代理服务启动完成
2022-12-28T17:23:23.9729579+08:00 [INF]
FastGithub.AppHostedService
FastGithub启动完成,当前版本为v2.1.4,访问 https://github.com/dotnetcore/fastgithub 关注新版本
2022-12-28T17:23:25.0609106+08:00 [WRN]
FastGithub.AppHostedService
请设置系统自动代理为http://127.0.0.1:38457,或手动代理http/https为127.0.0.1:38457
[root@localhost ~]# vim /etc/profile #根据上面输出结果,写入访问代理变量
export http_proxy=http://127.0.0.1:38457
export https_proxy=https://127.0.0.1:38457
[root@localhost ~]# grep "proxy" /etc/profile
export http_proxy=http://127.0.0.1:38457
export https_proxy=https://127.0.0.1:38457
[root@localhost ~]# source /etc/profile #使/etc/profile配置文件内容生效
3、输入docker-compose地址进行下载
下载docker-compose不同版本,可以去github找链接
[root@localhost ~]# curl -L https://github.com/docker/compose/releases/download/1.23.1/docker-compose-Linux-x86_64 > /usr/local/bin/docker-compose
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0
100 11.1M 100 11.1M 0 0 43577 0 0:04:29 0:04:29 --:--:-- 138k
[root@localhost ~]# chmod a+x /usr/local/bin/docker-compose #给docker-compose赋予可执行权限
4、查看docker-compose版本信息
[root@localhost ~]# docker-compose version
docker-compose version 1.23.1, build b02f1306
docker-py version: 3.5.0
CPython version: 3.6.7
OpenSSL version: OpenSSL 1.1.0f 25 Ma。y 2017