Docker Registry + redis 遇到的两个小坑

    xiaoxiao2021-03-26  35

    前提是这两个环境已经准备好了

    然后我安装官网的配置

    https://docs.docker.com/registry/configuration/

    我的理解是直接配置如下即可

    redis: addr: localhost:6379 password: asecret db: 0 dialtimeout: 10ms readtimeout: 10ms writetimeout: 10ms pool: maxidle: 16 maxactive: 64 idletimeout: 300s但是启动后没有任何日志出来,也没有错误提醒,捣鼓很久,总感觉这段配置没有生效,然后github找到原因

    https://github.com/docker/distribution/issues/657 需要配置如下

    storage: cache: layerinfo: redis For 2.1: storage: cache: blobdescriptor: redis启动时,显示模块加载成功,但是我在pull镜像时报错

    error connecting to redis instance IP:6379: dial tcp :IP:6379: getsockopt: connection refused

    在如下帖子中找到原因

    http://blog.csdn.net/tjcyjd/article/details/51488054

    要支持远程访问,还需要将配置文件中的bind 127.0.0.1注释掉

    重启服务,成功使用上了redis

    如果你也是第一次接触,可能会遇见相同的问题,希望能快速的帮助到你,其实这两个问题很简单,但我当时完全不懂的情况下,真是非常无解

    转载请注明原文地址: https://ju.6miu.com/read-663875.html

    最新回复(0)