注意其中的代理地址 HTTPS_PROXY
:
12345678910111213141516 | version: '3.1'services: registry: image: registry:2.8.2 #network_mode: "host" environment: REGISTRY_HTTP_ADDR: "0.0.0.0:5000" REGISTRY_PROXY_REMOTEURL: "https://registry-1.docker.io" REGISTRY_PROXY_TTL: 168h HTTPS_PROXY: "http://192.168.25.18:7890" restart: always container_name: registry ports: - 5000:5000 volumes: - "./registry:/var/lib/registry" |
---|
1 | docker-compose -f registry.yml up -d |
---|
sudo vim /etc/docker/daemon.json
12345678 | { ... "insecure-registries": ["192.168.1.30:5000"], "registry-mirrors": [ "http://192.168.1.30:5000" ] ...} |
---|
- https://dockerhub.mirrors.skybyte.me
References
- 自建Docker Hub镜像服务
- 自建 Docker Hub 镜像服务
- Distribution Registry - CNCF