1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| version: 0.1 log: fields: service: registry storage: cache: blobdescriptor: inmemory filesystem: rootdirectory: /var/lib/registry http: addr: :5000 headers: X-Content-Type-Options: [nosniff] health: storagedriver: enabled: true interval: 10s threshold: 3 proxy: remoteurl: https://gcr.io
|
1 2 3 4 5 6 7 8 9 10 11 12 13
| version: '3.7'
services: gcr_io: image: registry restart: always labels: - traefik.http.routers.gcr_io.rule=Host(`gcr.mirrors.yourdomain.com`) - traefik.http.routers.gcr_io.entrypoints=websecure - traefik.http.routers.gcr_io.service=gcr_io - traefik.http.services.gcr_io.loadbalancer.server.port=5000 volumes: - ./gcr.io.yml:/etc/docker/registry/config.yml
|
使用docker-compose up -d
命令启动代理服务。