Giter Club home page Giter Club logo

docker-proxy's Introduction


自建Docker镜像加速服务,基于官方 registry 一键部署Docker、K8s、Quay、Ghcr镜像加速\管理服务.


Telegram Group

扫描下方二维码加入微信群

📝 准备工作

⚠️ 重要:一台国外的服务器,并且未被墙。一个域名,无需国内备案,便宜的就行!选择部署Caddy可自动实现HTTPS。 如果部署的是Nginx服务,那么你需要申请一个免费的SSL证书或通过Acme.sh自动生成和续订Lets Encrypt免费SSL证书还可以把域名托管到Cloudflare 开启免费SSL证书

🚀 如果你身边没有上面提到的这些东西,那么你也可以部署到Render,详细操作查看下面教程

📦 部署

通过项目脚本部署

# CentOS
yum -y install wget curl
# ubuntu
apt -y install wget curl

bash -c "$(curl -fsSL https://raw.githubusercontent.com/dqzboy/Docker-Proxy/main/install/DockerProxy_Install.sh)"

使用 Render 部署

部署到 Render

🔨 功能

  • 一键部署Docker镜像代理服务的功能,支持基于官方Docker Registry的镜像代理.
  • 支持多个镜像仓库的代理,包括Docker Hub、GitHub Container Registry (ghcr.io)、Quay Container Registry (quay.io)和 Kubernetes Container Registry (k8s.gcr.io)
  • 自动检查并安装所需的依赖软件,如Docker、Nginx等,并确保系统环境满足运行要求.
  • 自动清理注册表上传目录中的那些不再被任何镜像或清单引用的文件
  • 提供了重启服务、更新服务、更新配置和卸载服务的功能,方便用户进行日常管理和维护
  • 支持主流Linux发行版操作系统,例如Centos、Ubuntu、Rocky、Debian、Rhel等
  • 支持主流ARCH架构下部署,包括linux/amd64、linux/arm64

✨ 教程

配置Nginx反向代理

注意: 如果你选择部署的是Nginx,那么代理程序部署完成之后,需自行配置 Nginx

1.下载仓库下的nginx配置文件 registry-proxy.conf 到你的nginx服务下,并修改配置里的域名和证书部分
2.在你的DNS服务提供商将相应的访问域名解析到部署docker proxy服务的机器IP上
3.修改Docker的daemon.json配置,配置你自建的Registry地址。修改后重启docker

~]# vim /etc/docker/daemon.json
{
    "registry-mirrors": [ "https://hub.your_domain_name" ],
    "log-opts": {
      "max-size": "100m",
      "max-file": "5"
    }
}

4. 使用自建的 Registry 地址替换官方的 Registry 地址拉取镜像

# docker hub Registry
## 源:nginx:latest
## 替换
docker pull hub.your_domain_name/library/nginx:latest

# K8s Registry
## 源:gcr.io/google-containers/pause:3.1
## 替换:
docker pull gcr.your_domain_name/google-containers/pause:3.1

5. 前缀替换的 Registry 的参考

源站 替换为 平台
docker.io hub.your_domain_name docker hub
gcr.io gcr.your_domain_name Google Container Registry
ghcr.io ghcr.your_domain_name GitHub Container Registry
k8s.gcr.io k8s-gcr.your_domain_name Kubernetes Container Registry
quay.io quay.your_domain_name Quay Container Registry

详细教程:自建Docker镜像加速服务:加速与优化镜像管理

📚 展示


系统环境检查 服务部署安装

💻 UI

docker-proxy

🫶 赞助

如果你觉得这个项目对你有帮助,请给我点个Star。并且情况允许的话,可以给我一点点支持,总之非常感谢支持😊

Alipay WeChat Pay

❤ 鸣谢

感谢以下项目的开源的付出:

CNCF Distribution

docker-registry-browser

docker-proxy's People

Contributors

dqzboy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.