代理
国内访问 GitHub 的若干方法
· ☕ 1 分钟
由于众所周知的原因,在国内的网络环境下,访问 Github 时,网络会阻断或者很慢。本文提供了若干访问方法。 1. 使用 Github Mirror 下载 直接在 GitHub 仓库前面拼接 Proxy 地址,不同的 Mirror 拼接方式可能有所不同。下面以拉取 https://github.com/shaowenchen/scripts 仓库为例。 https://ghproxy.chenshaowen.com 1 git clone https://github.com/shaowenchen/ops 2. 通过 Gitee 导入 GitHub 项目 可以参考文档: GitHu

如何绕过 DockerHub 拉取镜像限制
· ☕ 3 分钟
1. DockerHub 限制 终究还是绕不过下面这个报错: 1 Error response from daemon: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit DockerHub 从 2020 年 11 月 2 日,正式开始限制非付费用户的拉取频率: 匿名用户,每 6 小时只允许 pull 100 次 已登录用户,每 6 小时只允许 pull 200 次 好吧,正常情况下,到这里就友尽了,不让用就不

给 Kubernetes 配置 Proxy
· ☕ 1 分钟
通常,我们在主机上执行 export http_proxy/https_proxy 格式的命令,即可设置 Proxy 。但是主机上的设置在容器中并不会生效,下面提供了几种配置方法。 1. 配置 Docker 的代理 - Node 级 在需要使用 Proxy 的节点进行配置,下面以 Docker 为例: 创建配置文件 1 2 mkdir -p /etc/systemd/system/docker.service.d touch /etc/systemd/system/docker.service.d/https-proxy.conf 编辑配置文件,配置代理 [Service] Environment="HTTP_PROXY=http://proxy.example.com:80/" Environment="HTTPS_PROXY=https://proxy.example.com:443/" Environment="NO_PROXY=localhost,127.0.0.1" 重启 Docker 1 2 systemctl