Rails 求助,docker 环境下,docker build 时报错,已经设置 ruby china gem 镜像地址

fatcat · April 20, 2023 · Last by fatcat replied at April 20, 2023 · 382 hits
Retrying fetcher due to error (2/4): Bundler::HTTPError Could not fetch specs from https://gems.ruby-china.com/ due to underlying error <SocketError: Failed to open TCP connection to gems.ruby-china.com:443 (getaddrinfo: Temporary failure in name resolution) (https://gems.ruby-china.com/specs.4.8.gz)>

实际在浏览器中这个 specs 是可以下载的,但就是 docker compose build 的时候报错。 不知有哪位大佬遇到过这种情况?麻烦指点一下,谢谢。

看报错日志,似乎是 DNS 解析的问题:getaddrinfo那里。

Reply to daqing

确实是的,把 DNS 改掉后可以了。

fatcat closed this topic. 20 Apr 21:42
You need to Sign in before reply, if you don't have an account, please Sign up first.