小编dos*_*oss的帖子

docker pull over cache for private registry not working

我尝试使用docker 1.8在注册表2.1.1版本中发布的pull through缓存docker.在CentOS7.1上但是,我遵循这些网站,并没有充当镜像,任何输入将非常感激.我希望这是配置注册表服务和传递docker守护程序参数的正确方法.

网站:https : //github.com/docker/distribution/blob/master/docs/mirror.md http://docs.master.dockerproject.org/articles/registry_mirror/

脚步:

  1. 我添加了参数以传递给docker守护进程并重新启动它:

    # /etc/sysconfig/docker 
    # 
    # Other arguments to pass to the docker daemon process 
    # These will be parsed by the sysv initscript and appended 
    # to the arguments list passed to docker -d
    OPTIONS="--registry-mirror=http://localhost:5000" 
    
    Run Code Online (Sandbox Code Playgroud)
  2. 添加了注册表配置并挂载到容器:

    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://registry-1.docker.io
    
    Run Code Online (Sandbox Code Playgroud)
  3. 启动注册表容器

    docker run -d -p …
    Run Code Online (Sandbox Code Playgroud)

docker docker-registry

5
推荐指数
1
解决办法
1823
查看次数

标签 统计

docker ×1

docker-registry ×1