**⚠️ 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
- [x] One-click deployment of Docker image proxy services, supporting proxy based on the official Docker Registry.
- [x] 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).
- [x] Automatically checks for and installs required dependency software such as Docker, Nginx/Caddy, etc., and ensures the system environment meets the operational requirements.
- [x] Automatically renders the corresponding Nginx or Caddy service configuration based on the service you choose to deploy.
- [x] Supports login to Docker Hub with configured account password to access private mirrors on Docker Hub and solve the download frequency limitation of Docker Hub.
- [x] Support custom configuration of proxy cache time(PROXY_TTL)、Support configuring IP whitelist and blacklist to prevent malicious attacks.
- [x] Provides features for restarting services, updating services, updating configurations, and uninstalling services, making it convenient for users to perform daily management and maintenance.
- [x] Supports user selection of whether to provide authentication during deployment.
- [x] Supports configuration of proxy (HTTP_PROXY), only supports HTTP.
- [x] Solves the problem of being unable to install Docker services in the domestic environment.
- [x] Supports mainstream Linux distribution operating systems, such as CentOS, Ubuntu, Rocky, Debian, RHEL, etc.
- [x] 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](https://raw.githubusercontent.com/dqzboy/Docker-Proxy/main/nginx/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**
```shell
~]# 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.**
```shell
# 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
| nvcr.io | nvcr.your_domain_name | NVIDIA Container Registry
---
> **Detailed Tutorial:**
> [Self-built Docker Image Acceleration Service: Accelerating and Optimizing Image Management](https://www.dqzboy.com/8709.html)
> [Build your own Docker image acceleration, and host the domain name to CF to accelerate image pulling.](https://www.dqzboy.com/17665.html)
## 💻 Hubcmd-UI
> HubCMD-UI Manual Installation Guide: [View Tutorial](hubcmdui/README.md)
| 镜像加速 |
镜像搜索 |
 |
 |
| 文档管理 |
TAG搜索 |
 |
 |
| 控制面板 |
容器管理 |
 |
 |
---
## 🫶 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](https://distribution.github.io/distribution/)
[docker-registry-browser](https://github.com/klausmeyer/docker-registry-browser)
## 🤝 Contributing
Thanks to everyone who has contributed!
## License
Docker-Proxy is available under the [Apache 2 license](./LICENSE)
---
[](https://star-history.com/#dqzboy/Docker-Proxy&Date)