ragflow icon indicating copy to clipboard operation
ragflow copied to clipboard

[Question]: docker build error : docker build --platform linux/amd64 --build-arg LIGHTEN=1 -f Dockerfile -t infiniflow/ragflow:nightly-slim .Error executing build image command: docker build --platform linux/amd64 --build-arg LIGHTEN=1

Open wuqilei-code opened this issue 7 months ago • 4 comments

Self Checks

  • [x] I have searched for existing issues search for existing issues, including closed ones.
  • [x] I confirm that I am using English to submit this report (Language Policy).
  • [x] Non-english title submitions will be closed directly ( 非英文标题的提交将会被直接关闭 ) (Language Policy).
  • [x] Please do not modify this template :) and fill in all the required fields.

Describe your problem

I always encounter an error in step 7 when executing the build image command. The error message seems to indicate a network issue, but when I click on the error link, it redirects to the browser where I can download the corresponding resources. Please help me solve this problem. Thank you very much

Complete Command:docker build --platform linux/amd64 --build-arg LIGHTEN=1 -f Dockerfile -t infiniflow/ragflow:nightly-slim . Code version:0.19.0

Image

Image

Image

wuqilei-code avatar Jun 12 '25 15:06 wuqilei-code

Hi @wuqilei-code! I'm Dosu and I’m helping the ragflow team.

Your Docker build error is likely caused by network connectivity issues when the build process tries to fetch packages or connect to mirrors. This is a common problem, especially if the build is configured to use a specific mirror that is unreachable from your environment.

Here are some steps that have resolved similar issues for others:

  • Try building with the argument --build-arg NEED_MIRROR=0 to use the default PyPI and Ubuntu repositories instead of a regional mirror. For example:
    docker build --platform linux/amd64 --build-arg LIGHTEN=1 --build-arg NEED_MIRROR=0 -f Dockerfile -t infiniflow/ragflow:nightly-slim .
    
  • If you need to use a mirror, make sure your network allows outbound HTTPS connections to it, and that the mirror is currently serving packages. Sometimes a mirror can respond to ping but not actually serve files, or it may block certain IP ranges (like those from CI/CD or cloud providers) (source).
  • If you are on Mac OS or using Docker Desktop, try using Docker Buildx instead of the standard build command, as this has resolved SSL and package installation issues for other users (source).
  • If you continue to have issues, try switching to a different, reliable mirror (such as Tsinghua or Douban) by changing the URL in the Dockerfile or your build arguments (source).

If you still encounter errors, double-check your DNS, firewall, and proxy settings to ensure nothing is blocking access to the required repositories.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

dosubot[bot] avatar Jun 12 '25 15:06 dosubot[bot]

There is currently/was just a huge outage of multiple huge services (Cloudflare, some Google services, AWS). Maybe it was that?

panzi avatar Jun 12 '25 21:06 panzi

嗨!我是 Dosu,我正在帮助 ragflow 团队。

您的 Docker 构建错误可能是由构建过程尝试获取软件包或连接到镜像时出现的网络连接问题引起的。这是一个常见问题,尤其是当构建配置为使用无法从环境中访问的特定镜像时。

以下是为其他人解决类似问题的一些步骤:

  • 尝试使用参数进行构建,以使用默认的 PyPI 和 Ubuntu 存储库,而不是区域镜像。 例如:`--build-arg NEED_MIRROR=0```` docker build --platform linux/amd64 --build-arg LIGHTEN=1 --build-arg NEED_MIRROR=0 -f Dockerfile -t infiniflow/ragflow:nightly-slim .
  • 如果您需要使用镜像,请确保您的网络允许到它的出站 HTTPS 连接,并且镜像当前正在提供软件包。有时,镜像可以响应 ping 但实际上不会提供文件,或者它可能会阻止某些 IP 范围(例如来自 CI/CD 或云提供商的 IP 范围)(来源)。
  • 如果您使用的是 Mac OS 或使用 Docker Desktop,请尝试使用 Docker Buildx 而不是标准 build 命令,因为这已经解决了其他用户的 SSL 和软件包安装问题(源代码)。
  • 如果问题仍然存在,请尝试通过更改 Dockerfile 中的 URL 或构建参数(源)来切换到其他可靠的镜像(例如 Tsinghua 或 Douban)。

如果您仍然遇到错误,请仔细检查您的 DNS、防火墙和代理设置,以确保没有任何东西阻止对所需存储库的访问。

要回复,只需提及@dosu

我做得怎么样? |无关紧要 |不正确 |冗长 |幻觉 |报告 🐛 | 其他  加入 Discord 在 X 上分享

Hello, I used the new command you provided to execute it, and it passed step 7. However, now in step 13, there is a problem where the zip file cannot be found, but I am executing: uv run download_deps-py docker build -f Dockerfile.deps -t infiniflow/ragflow_deps . It should have been inserted. Could you please help me check where the problem lies again? Thank you very much @dosu Image

wuqilei-code avatar Jun 13 '25 01:06 wuqilei-code

@dosu

wuqilei-code avatar Jun 13 '25 01:06 wuqilei-code