Docker Registry + redis 遇到的两个小坑
前提是这两个环境已经准备好了然后我安装官网的配置https://docs.docker.com/registry/configuration/我的理解是直接配置如下即可redis:addr: localhost:6379password: asecretdb: 0dialtimeout: 10msreadtimeout: 10mswritet
·
前提是这两个环境已经准备好了
然后我安装官网的配置
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
如果你也是第一次接触,可能会遇见相同的问题,希望能快速的帮助到你,其实这两个问题很简单,但我当时完全不懂的情况下,真是非常无解
更多推荐
已为社区贡献1条内容
所有评论(0)