This commit is contained in:
陈国伟 2021-11-09 11:34:08 +08:00
commit 3df3bfcbbe
2 changed files with 40 additions and 1 deletions

View File

@ -22,7 +22,12 @@ github加速神器解决github打不开、用户头像无法加载、releases
* 安装cacert/fastgithub.cer并设置信任
* 设置系统自动代理为`http://127.0.0.1:38457`或手动代理http/https为`127.0.0.1:38457`
* [具体配置详情](https://github.com/dotnetcore/FastGithub/blob/master/MacOSXConfig.md)
#### 2.4 docker-compose一键部署
* 准备好docker 18.09, docker-compose.
* 在源码目录下有一个docker-compose.yaml 文件专用于在实际项目中临时使用github.com源码而做的demo配置。
* 根据自己的需要更新docker-compose.yaml中的sample和build镜像即可完成拉github.com源码加速并基于源码做后续的操作。
### 3 软件功能
* 提供域名的纯净IP解析
* 提供IP测速并选择最快的IP

34
docker-compose.yaml Normal file
View File

@ -0,0 +1,34 @@
version: "3.7"
services:
fastgithub:
image: slcnx/fastgithub
network_mode: host
restart: always
volumes:
- cacert:/fastgithub/cacert/
sample:
depends_on:
- fastgithub
image: slcnx/ubuntu:18.04
volumes:
- cacert:/tmp/cacert
- build_data:/build_data
working_dir: /build_data
restart: on-failure
tty: true
entrypoint: sh -c 'cp /tmp/cacert/fastgithub.cer /usr/local/share/ca-certificates/fastgithub.crt && update-ca-certificates && git clone https://github.com/kubernetes/kubernetes.git'
command: ""
environment:
https_proxy: http://127.0.0.1:38457
http_proxy: http://127.0.0.1:38457
network_mode: host
build:
working_dir: /build_data
depends_on:
- sample
image: nginx
volumes:
- build_data:/build_data
volumes:
cacert: {}
build_data: {}