Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

我想连接外部redis但是连接超时 是因为我网络设置模式有问题么? #29

Closed
Edison6351 opened this issue Apr 23, 2018 · 2 comments

Comments

@Edison6351
Copy link

Edison6351 commented Apr 23, 2018

我来详细描述一下我的问题:
docker应该默认是桥接也就是我本机上面能够访问内网redis docker容器是不是也就可以访问redis
我的错误截图如下:

image

现在是连接redis超时状态,这个问题让我很困惑,请帮助

@Edison6351
Copy link
Author

我本机是可以正常访问redis的 但是docker上面就没有办法访问连接redis 是我网络模式设置有问题么?

@yeszao
Copy link
Owner

yeszao commented Apr 24, 2018

你指的是docker 上其他容器连接redis容器吗?
如果是这样的话

  • 宿主机用127.0.0.1:6379连接redis容器
  • 其他容器用redis:6378连接(前提是该容器必须link redis容器)

@yeszao yeszao closed this as completed May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants