Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Docker image build error for order-processor

未关闭
#5 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
docker, python
领域
backend, devops

调研方向

从第 33 行的 Dockerfile 和第 2 行的 requirements.txt 开始,这里安装 grpcio 时会因为缺少 c++ 可执行文件而失败。复现 order-processor 镜像的构建,并检查容器的构建依赖;当使用列出的 requirements 成功构建 Docker 镜像时即表示完成。

由索引模型根据 Issue 内容生成。

描述

When I'm trying to build the image for order-processor using its Dockerfile I've got this build error:


1.115 Collecting grpcio>=1.37.0 (from dapr->-r requirements.txt (line 2))
1.124 Downloading grpcio-1.56.2.tar.gz (24.3 MB)
3.013 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 24.3/24.3 MB 10.5 MB/s eta 0:00:00
3.953 Installing build dependencies: started
5.083 Installing build dependencies: finished with status 'done'
5.084 Getting requirements to build wheel: started
5.183 Getting requirements to build wheel: finished with status 'error'
5.185 error: subprocess-exited-with-error
5.185
5.185 × Getting requirements to build wheel did not run successfully.
5.185 │ exit code: 1
5.185 ╰─> [27 lines of output]
5.185 :43: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
5.185 Traceback (most recent call last):
5.185 File "/home/app/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in
5.185 main()
5.185 File "/home/app/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
5.185 json_out['return_val'] = hook(**hook_input['kwargs'])
5.185 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5.185 File "/home/app/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/in_process/in_process.py", line 118, in get_requires_for_build_wheel
5.185 return hook(config_settings)
5.185 ^^^^^^^^^^^^^^^^^^^^^
5.185 File "/tmp/pip-build-env-lvpc9zo
/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
5.185 return self.get_build_requires(config_settings, requirements=['wheel'])
5.185 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5.185 File "/tmp/pip-build-env-lvpc9zo
/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 323, in get_build_requires
5.185 self.run_setup()
5.185 File "/tmp/pip-build-env-lvpc9zo
/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 488, in run_setup
5.185 self).run_setup(setup_script=setup_script)
5.185 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5.185 File "/tmp/pip-build-env-lvpc9zo
/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in run_setup
5.185 exec(code, locals())
5.185 File "", line 263, in
5.185 File "", line 210, in check_linker_need_libatomic
5.185 File "/usr/local/lib/python3.11/subprocess.py", line 1026, in init
5.185 self._execute_child(args, executable, preexec_fn, close_fds,
5.185 File "/usr/local/lib/python3.11/subprocess.py", line 1950, in _execute_child
5.185 raise child_exception_type(errno_num, err_msg, err_filename)
5.185 FileNotFoundError: [Errno 2] No such file or directory: 'c++'
5.185 [end of output]
5.185
5.185 note: This error originates from a subprocess, and is likely not a problem with pip.
5.186 error: subprocess-exited-with-error
5.186
5.186 × Getting requirements to build wheel did not run successfully.
5.186 │ exit code: 1
5.186 ╰─> See above for output.
5.186
5.186 note: This error originates from a subprocess, and is likely not a problem with pip.
5.192
5.192 [notice] A new release of pip is available: 23.1.2 -> 23.2.1
5.192 [notice] To update, run: pip install --upgrade pip

Dockerfile:33

31 | #RUN pip install wheel
32 | #RUN pip install grpcio
33 | >>> RUN pip install -r requirements.txt
34 |
35 | # define the port number the container should expose

ERROR: failed to solve: process "/bin/sh -c pip install -r requirements.txt" did not complete successfully: exit code: 1


For some reason, it is not possible to install grpcio package.

Any idea why?

Regis

主要语言
Bicep
星标
5
派生
10
PR 合并指标
30 天内没有已合并 PR

环境准备

我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Azure-Samples/svc-invoke-dapr-python 的其他 Issue

查看 Azure-Samples/svc-invoke-dapr-python 的全部 Issue

相似的 Issue

更多 Backend & API Design Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。