Giter VIP home page Giter VIP logo

Comments (10)

Tsuk1ko avatar Tsuk1ko commented on June 12, 2024

看看容器日志?

from cq-picsearcher-bot.

jx9468 avatar jx9468 commented on June 12, 2024

查看集装箱日志?

d3b0235ef822331b4a5b6ee6454518a
系统:Ubuntu 22

from cq-picsearcher-bot.

Tsuk1ko avatar Tsuk1ko commented on June 12, 2024

看日志是成功连接了呀🤔

from cq-picsearcher-bot.

jx9468 avatar jx9468 commented on June 12, 2024

看日志是成功连接了呀🤔

aca5ff24ff5ae950be156273565c527
一直连接中,指令也是没有反应的😭

from cq-picsearcher-bot.

jx9468 avatar jx9468 commented on June 12, 2024

看日志是成功连接了呀🤔

21eac7209de2665002b54510f02be22
尝试在宿主机运行zerobot是能够连接的,应该不是gocq的问题😥

from cq-picsearcher-bot.

Tsuk1ko avatar Tsuk1ko commented on June 12, 2024

🥲哦看错了,这个情况的话说明配置文件是有成功映射进来了,但是连接不成功,看看是不是 go-cqhttp docker 的问题,你可以尝试在本机部署 go-cqhttp

from cq-picsearcher-bot.

Tsuk1ko avatar Tsuk1ko commented on June 12, 2024

🧐那可能是 host 的问题,你试试找到网关 ip 直接设置 ip,不用那个域名

或者暴力一点的话直接改成 host 网络模式吧……就可以直接 127.0.0.1 了,而且我看你 go-cqhttp 也是 host 网络模式,实际上也不需要 -p 映射端口

from cq-picsearcher-bot.

jx9468 avatar jx9468 commented on June 12, 2024

🧐那可能是 host 的问题,你试试找到网关 ip 直接设置 ip,不用那个域名

或者暴力一点的话直接改成 host 网络模式吧……就可以直接 127.0.0.1 了,而且我看你 go-cqhttp 也是 host 网络模式,实际上也不需要 -p 映射端口

我再折腾折腾🤔实在不行的话就不用docker了gocq也没有docker-compose文件,维护也并不方便多少😪

from cq-picsearcher-bot.

jx9468 avatar jx9468 commented on June 12, 2024

改成 host 网络模式确实可以成功,就是不知道原先配置到底哪出的问题🤦‍♂️

from cq-picsearcher-bot.

Tsuk1ko avatar Tsuk1ko commented on June 12, 2024

大概是这个没起作用

extra_hosts:
- "host.docker.internal:host-gateway"

我也不知道为什么,我自己用 mac 和 linux 测过都 ok,不过网上也能搜到一些不起作用的案例

总之几种解决方案:

  1. 直接用 host 模式,然后连 127.0.0.1
  2. 获取 docker 的网关地址,例如 bash 进 docker 容器然后 ip addr 看 gateway,一般是 172.xx.0.1 这样的,然后连这个 ip
  3. 把 go-cqhttp 容器也写到 docker-compose 配置里,配到同一个网络,然后就可以直接用 name 作为 host 连接,不过也需要配置 depends_on,甚至可能需要 wait-for-it

from cq-picsearcher-bot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.