【问题标题】:Can't install docker-compose into jenkins dockerfile无法将 docker-compose 安装到詹金斯 dockerfile
【发布时间】:2021-11-04 22:27:41
【问题描述】:

我尝试将 docker-compose 安装到 docker-container 中,但构建失败。 这是我的 dockerfile:

FROM jenkinsci/blueocean USER root RUN apk add --no-cache py-pip python3-dev libffi-dev openssl-dev gcc libc-dev rust cargo make gettext RUN pip3 install docker-compose

USER jenkins

它向我显示了一个错误: Building wheels for collected packages: bcrypt, cryptography, pynacl, pyrsistent, PyYAML Building wheel for bcrypt (PEP 517): started Building wheel for bcrypt (PEP 517): finished with status 'done' Created wheel for bcrypt: filename=bcrypt-3.2.0-cp39-cp39-linux_x86_64.whl size=64287 sha256=4d90a6bcaa110ba58a48889ded4adb0f92fa7966ea45a8abeea0ad6f8a94004f Stored in directory: /root/.cache/pip/wheels/9a/0b/a2/2c559982bbee4bd184557267e5760e114de3e9ba826fe8d691 Building wheel for cryptography (PEP 517): started Building wheel for cryptography (PEP 517): still running... Building wheel for cryptography (PEP 517): finished with status 'done' Created wheel for cryptography: filename=cryptography-3.4.8-cp39-cp39-linux_x86_64.whl size=1360638 sha256=ef093594bbb07d34bc6de28f7447a6c257813cda8e83f5254c42d01b602351da Stored in directory: /root/.cache/pip/wheels/28/ea/c2/e48100a4f4674263f982c899942ed5225966b37b47e9b631f6 Building wheel for pynacl (PEP 517): started Building wheel for pynacl (PEP 517): finished with status 'error' ERROR: Command errored out with exit status 1: command: /usr/bin/python3 /usr/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpi_pcnqvb cwd: /tmp/pip-install-w50jx1wy/pynacl_e9c31de258254c47941580c85da83563 Complete output (322 lines): running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.9 creating build/lib.linux-x86_64-3.9/nacl ....
subprocess.CalledProcessError: Command '['make']' returned non-zero exit status 2.

错误:pynacl 的构建轮失败 pyrsistent 成型轮 (PEP 517):开始 用于 pyrsistent 的构建轮 (PEP 517):以“完成”状态完成 为 pyrsistent 创建轮子:filename=pyrsistent-0.18.0-cp39-cp39-linux_x86_64.whl size=115732 sha256=24c93c9e75844cd86f8fee6965a97c1e7068c5042b7745085d612c047cf23103 存放在目录:/root/.cache/pip/wheels/dd/c8/61/04c6d218b3691f75353d7f74fed3fbd40e0ee9e2d1e2ce24c6 PyYAML (PEP 517) 的构建轮:开始 PyYAML (PEP 517) 的构建轮:完成状态为“完成” 为 PyYAML 创建的轮子:filename=PyYAML-5.4.1-cp39-cp39-linux_x86_64.whl size=45654 sha256=231652b88a0bcee5f8b831941b4bf38a80d8815a54474f798a482a128047402b 存放在目录:/root/.cache/pip/wheels/b7/a5/c4/504d913c2a55bb09c607541578ec5f844d1ff33467abe93ba5 成功构建 bcrypt 密码学 pyrsistent PyYAML 无法构建 pynacl 错误:无法为使用 PEP 517 且无法直接安装的 pynacl 构建轮子 错误:服务 'jenkins' 无法构建:命令 '/bin/sh -c apk add --no-cache py-pip python3-dev libffi-dev openssl-dev gcc libc-dev rust cargo make gettext && pip3 install docker -compose' 返回一个非零代码:1

我试图升级/降级 pip,但它保持不变。请帮忙。

【问题讨论】:

  • 搜索“错误:无法为使用 PEP 517 且无法直接安装的 pynacl 构建轮子”。
  • 我在问之前就做了。我能找到的只是 python 和环境特定的问题。他们建议更新/降级 pip。早些时候,我可以使用这样的说明构建容器。现在,有些东西更新了……它不再工作了。

标签: python docker jenkins docker-compose pip


【解决方案1】:

我更改了我的 dockerfile,它现在可以工作了。 https://wiki.alpinelinux.org/wiki/Docker

FROM jenkinsci/blueocean

USER root RUN apk add --no-cache docker-compose USER jenkins

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-02-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多