diff --git a/README.md b/README.md index eadc6bd..63d75e5 100644 --- a/README.md +++ b/README.md @@ -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; diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..f86dff3 --- /dev/null +++ b/docker-compose.yaml @@ -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: {}