运行 ./discourse-setup 时,它持续失败并报错:
cd /pups && git pull && /pups/bin/pups --stdin
fatal: unable to access 'https://github.com/discourse/pups.git/': Could not resolve host: github.com
fe7a66f6321f948dd840124da1f0165db18807367b4419e1cc9906eb7f71a0a8
** FAILED TO BOOTSTRAP **
我尝试了至少 3 种从本论坛和 GitHub 上找到的解决方案,包括一些关于 Docker 中“缺乏互联网”和"DNS 问题”的 Stack Overflow 回答。
我还尝试了至少 2 个不同的教程来设置 Discourse 论坛软件,包括官方教程和其他一些教程。
尝试过设置带有 DNS 配置的 daemon.json 文件,将 docker0 接口设置为混杂模式等操作。
但即便如此,问题依旧存在。
我使用的是由 OVH 托管的 Ubuntu 20.04 服务器。
在宿主机上我可以 ping 通 github.com 并收到响应,但在 Docker 环境中却无法做到。
有人能帮忙吗?
编辑:在容器环境的 /etc/hosts 文件中手动添加了 github IP 地址后,现在的错误信息从“无法解析 github.com”变成了“连接超时”。