🔥 🔥 🔥 自建Docker镜像加速服务,基于官方Docker Registry 一键部署Docker、K8s、Quay、Ghcr、Mcr等镜像加速\管理服务。支持部署到Render\Koyeb https://dqzboy.github.io/proxyui/

dqzboy 48a69d7d31 fix: Adjust the display style of the advertisement on the hubcmdui front end. hace 1 año
.github f91b104ae4 chore: Close stale issues hace 1 año
Ad bd9409bf66 docs: README.md hace 1 año
Issue 1ab4d3a51e docs: issue.md hace 1 año
Koyeb 0183a3e52f docs: Issue/issue.md hace 1 año
Render e42651a91b docs: README.md hace 1 año
caddy 247804240d fix: Config file modified. hace 1 año
config bb096159f1 style: registry config file hace 1 año
hubcmdui 48a69d7d31 fix: Adjust the display style of the advertisement on the hubcmdui front end. hace 1 año
install 281b5f3fbc fix: Resolve the issue of the Compose command not being found. hace 1 año
nginx 247804240d fix: Config file modified. hace 1 año
.gitignore c12aa767b9 Update .gitignore hace 1 año
Dockerfile 103b6c36d5 feat: Add Docker Compose Deployment hace 1 año
LICENSE a2da5bd733 Update LICENSE hace 1 año
README.en.md e52f24e0c4 docs: README.md hace 1 año
README.md e52f24e0c4 docs: README.md hace 1 año
docker-compose.yaml 2fac022475 feat: the default configuration path has changed to /etc/distribution/config.yml hace 1 año

README.en.md

中文 | English


Self-built Docker image acceleration service, based on the official registry, one-click deployment of Docker, K8s, Quay, Ghcr, Mcr, elastic, and other image acceleration management services.

[![Auth](https://img.shields.io/badge/Auth-dqzboy-ff69b4)](https://github.com/dqzboy) [![GitHub contributors](https://img.shields.io/github/contributors/dqzboy/Docker-Proxy)](https://github.com/dqzboy/Docker-Proxy/graphs/contributors) [![GitHub Issues](https://img.shields.io/github/issues/dqzboy/Docker-Proxy.svg)](https://github.com/dqzboy/Docker-Proxy/issues) [![GitHub Pull Requests](https://img.shields.io/github/stars/dqzboy/Docker-Proxy)](https://github.com/dqzboy/Docker-Proxy) [![HitCount](https://views.whatilearened.today/views/github/dqzboy/Docker-Proxy.svg)](https://github.com/dqzboy/Docker-Proxy) [![GitHub license](https://img.shields.io/github/license/dqzboy/Docker-Proxy)](https://github.com/dqzboy/Docker-Proxy/blob/main/LICENSE) 📢 Docker Proxy-Communication Group

📝 Preparation

⚠️ Important: Choose a server located abroad and not blocked in your region. For the domain name, there is no need to register it with domestic authorities. You can also apply for a free domain through various platforms. During the one-click deployment process, if you choose to install Caddy, it will automatically configure HTTPS. If you opt to deploy Nginx, you'll need to apply for a free SSL certificate yourself or use other methods to implement SSL encryption.

High-Cost-Effective Overseas VPS Recommendation: Click to View

Free domain certificate application
**Method one:** [Acme.sh Automatically Generate and Renew Lets Encrypt Free SSL Certificate](https://www.dqzboy.com/16437.html) **Method two:** Domain hosted to[Cloudflare enabling free SSL certificate](https://www.cloudflare.com/zh-cn/application-services/products/ssl/) **Method Three:** You can apply for a free domain certificate (typically a DV certificate) through a third-party platform, suitable for personal websites, blogs, and small projects.
If you don't have the environment mentioned above, you can try the following several schemes
**Scheme one:** 🚀 🚀 If you don't have the things mentioned above, you can also deploy to **[Render](Render/README.md)** **Scheme two:** If you only have one server and don't want to deal with domain names or configure TLS, then you can configure Docker's configuration file `daemon.json`, and specify `insecure-registries` to configure your image acceleration address **Scheme three:** If you're deploying on a server within China, you can configure proxies while executing one-click deployment, which will also help solve the problem of Docker not being able to install domestically

During the deployment process, if you encounter any issues or questions, please scroll down to find the problem, see if your situation has been listed! Try to resolve it yourself first.


📦 Deploy

Deploy through project script

# CentOS && RHEL && Rocky
yum -y install curl
# ubuntu && debian
apt -y install curl

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

# domestic environment
bash -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/dqzboy/Docker-Proxy/install/DockerProxy_Install.sh)"

Deployment to Third-Party Platforms

Deploy to Render
> Render offers a free quota, and you can further increase the quota after adding a card. Deploy quickly with Render: [View Tutorial](Render/README.md)
Deploy to Koyeb
> The domain name assigned by Koyeb is not very stable when accessed in the domestic area, not highly recommended! Deploy quickly with Koyeb: [View Tutorial](Koyeb/README.md)

Docker Compose Deployment

Manual Container Deployment
**⚠️ Note:** Download the configuration for whichever mirror repository you need to accelerate. The `docker-compose.yaml` file by default deploys the acceleration service for all foreign mirror repositories, again you configure whichever one you deploy, and delete the rest! **1.** Download the corresponding `yml` file from the [config](https://github.com/dqzboy/Docker-Proxy/tree/main/config) directory to your local machine. **2.** Download the [docker-compose.yaml](https://github.com/dqzboy/Docker-Proxy/blob/main/docker-compose.yaml) file to your local machine and place it in the same directory level as the configuration file. **3.** Execute the `docker compose` command to start the container service. ```shell docker compose up -d # View container logs docker logs -f [Container ID or Name] ``` **4.** If you are not familiar with Nginx or Caddy, you can use a service you are familiar with for proxying. You can also access directly via IP and port number.

🔨 Features

  • One-click deployment of Docker image proxy services, supporting proxy based on the official Docker Registry.
  • Supports proxy for multiple image repositories, including Docker Hub, GitHub Container Registry (ghcr.io), Quay Container Registry (quay.io), Kubernetes Container Registry (k8s.gcr.io), Microsoft Container (mcr.microsoft.com), Elastic Stack (docker.elastic.co).
  • Automatically checks for and installs required dependency software such as Docker, Nginx/Caddy, etc., and ensures the system environment meets the operational requirements.
  • Automatically renders the corresponding Nginx or Caddy service configuration based on the service you choose to deploy.
  • Automatically cleans up files in the registry upload directory that are no longer referenced by any image or manifest.
  • Support custom configuration of proxy cache time(PROXY_TTL)
  • Provides features for restarting services, updating services, updating configurations, and uninstalling services, making it convenient for users to perform daily management and maintenance.
  • Supports user selection of whether to provide authentication during deployment.
  • Supports configuration of proxy (HTTP_PROXY), only supports HTTP.
  • Solves the problem of being unable to install Docker services in the domestic environment.
  • Supports mainstream Linux distribution operating systems, such as CentOS, Ubuntu, Rocky, Debian, RHEL, etc.
  • Supports deployment on mainstream ARCH architectures, including linux/amd64, linux/arm64.

✨ Tutorial

Configure Nginx Reverse Proxy

Note: If you choose to deploy with Nginx, after the proxy program is deployed, you need to configure Nginx yourself.

1.Download the registry-proxy.conf configuration file from the repository to your Nginx service and modify the domain name and certificate sections in the configuration
2.Resolve the corresponding access domain name to the IP of the machine where the Docker proxy service is deployed at your DNS service provider
3.Modify the Docker daemon.json configuration to configure your self-built Registry address. Restart Docker after modification

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

Explanation: After configuring the daemon.json, you no longer need to specify your acceleration address when pulling images; simply execute docker pull to retrieve the images you need. The following steps are for when you have not configured the daemon.json, and you need to include your acceleration address to pull images normally.


1. Replace the official Registry address with your own Registry address to pull the image.

# Docker Hub Registry
## Original: nginx:latest
## Replace with:
docker pull hub.your_domain_name/library/nginx:latest

# Google Registry
## Original: gcr.io/google-containers/pause:3.1
## Replace with:
docker pull gcr.your_domain_name/google-containers/pause:3.1

2. Prefix replacement reference for the Registry.

Source Replace with Platform
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
registry.k8s.io k8s.your_domain_name Kubernetes's container image registry
quay.io quay.your_domain_name Quay Container Registry
mcr.microsoft.com mcr.your_domain_name Microsoft Container Registry
docker.elastic.co elastic.your_domain_name Elastic Stack

Detailed Tutorial:
Self-built Docker Image Acceleration Service: Accelerating and Optimizing Image Management
Build your own Docker image acceleration, and host the domain name to CF to accelerate image pulling.

📚 Display


<tr>
  <td width="50%" align="center"><b>System Environment Check</b></td>
  <td width="50%" align="center"><b>Service Deployment and Installation</b></td>
</tr>
<tr>
    <td width="50%" align="center"><img src="https://github.com/dqzboy/Docker-Proxy/assets/42825450/55df7f6f-c788-4200-9bcd-631998dc53ef?raw=true"></td>
    <td width="50%" align="center"><img src=https://github.com/dqzboy/Docker-Proxy/assets/42825450/c544fb1e-ecd5-447c-9661-0c5913586118?raw=true"></td>
</tr>

💻 UI


<tr>
  <td width="50%" align="center"><b>Docker Registry UI</b></td>
  <td width="50%" align="center"><b>Docker-Proxy CmdUI</b></td>
</tr>
<tr>
    <td width="50%" align="center"><img src="https://github.com/dqzboy/Docker-Proxy/assets/42825450/0ddb041b-64f6-4d93-b5bf-85ad3b53d0e0?raw=true"></td>
    <td width="50%" align="center"><img src="https://github.com/user-attachments/assets/2efe5d7e-6542-4867-9e50-17fa0e704b23?raw=true"></td>
</tr>


🫶 Sponsorship

If you find this project helpful, please give it a Star. And if possible, you can also give me a little support. Thank you very much for your support.😊

Alipay WeChat Pay

👨🏻‍💻 Issue

Problem Summary
> Summary of common issues related to deployment and usage, welcome to add more! Problem Summary: [Click to view](Issue/issue.en.md)

😺 Other

Open Source is not easy, if you reference this project or make modifications based on it, could you please credit this project in your documentation? Thank you!

❤ Acknowledgements

Thanks to the open source contributions of the following projects:

CNCF Distribution

docker-registry-browser

🤝 Contributing

Thanks to everyone who has contributed!

License

Docker-Proxy is available under the Apache 2 license


Star History Chart