Repository navigation
Docker Engine and Desktop
Use
registry-mirrorsfor Docker Hub only; rewrite other registry hosts. For a one-off pull, usedocker pull mirror.example.com/library/busybox:1.36.1.
This page configures MirrorProxy for Docker Engine, Docker Desktop, and OrbStack. Replace
mirror.example.com with your deployment hostname.
Use the client to merge /etc/docker/daemon.json structurally:
mirrorproxy set docker --mirror mirrorproxy --base-url https://mirror.example.com \
--scope system --dry-run
sudo mirrorproxy set docker --mirror mirrorproxy --base-url https://mirror.example.com \
--scope systemReview the preview, then restart Docker during a maintenance window:
sudo systemctl restart docker
docker info | sed -n '/Registry Mirrors/,+5p'
docker pull busybox:1.36.1The client changes only registry-mirrors, preserves existing JSON fields, and keeps rollback
state. If Docker fails to start, run
dockerd --validate --config-file /etc/docker/daemon.json and inspect
journalctl -u docker -n 100.
-
Open Settings → Docker Engine.
-
Merge this field into the existing JSON without deleting other keys:
{ "registry-mirrors": ["https://mirror.example.com"] } -
Select Apply & Restart.
-
Run
docker infoand a realdocker pullfrom a terminal.
A hostname with valid HTTPS does not belong in insecure-registries. If enterprise policy manages
Docker Desktop, have the administrator distribute the setting instead of overwriting it locally.
Open the Docker configuration in OrbStack settings, or review
~/.orbstack/config/docker.json, merge the same registry-mirrors field, and follow the restart
prompt. Verify the result with docker info.
Docker Hub images can keep their original references. Other supported registries require explicit rewrites:
services:
api:
image: mirror.example.com/ghcr.io/owner/api:1.0
worker:
image: mirror.example.com/mcr.microsoft.com/dotnet/runtime:8.0FROM mirror.example.com/docker.elastic.co/elasticsearch/elasticsearch:8.13.4The Container Registry Workbench can rewrite Compose YAML and Dockerfiles. Review the diff before committing it, and pin a deliberate tag or digest in CI.
sudo mirrorproxy reset docker --scope system --dry-run
sudo mirrorproxy reset docker --scope system
sudo systemctl restart docker- Restarting Docker may interrupt containers. Use a maintenance window and preserve an independent management connection.
-
registry-mirrorscovers Docker Hub only, not GHCR, GCR, Quay, or MCR. - A
docker infoentry proves only that Docker loaded the setting; verify a manifest and blob pull. - Fully qualified third-party images in Dockerfiles or Compose require explicit MirrorProxy paths.
开始使用 · Start here
- 首页 · Home
- Docker + HTTPS 快速开始 · Quick start
- 二进制与已有入口部署 · Deployment
- 常见反向代理配置 · Reverse proxies
- 常见问题 · Troubleshooting
日常使用 · Everyday use
- 客户端改源 · Client
- Agent Skill 与 MCP · Agent integration
- Linux 系统与版本支持 · Linux system sources
- 其他客户端安装方式 · Client installation
- 支持的软件源 · Sources
- 容器镜像总览 · Container images
- 后台管理 · Administration
进阶配置 · Advanced
开发与维护 · Development