3

我正在尝试使用基于 alpine 的 robotsframework-sshlibrary 构建 docker 映像,但收到一条神秘的错误消息:

config.status: executing libtool commands
make: /bin/sh: Operation not permitted
make: ** [Makefile:514: all-recurcive] Error 127
...
----------------------------------------------
ERROR: Failed building wheel for pynacl
ERROR: Could not build wheels for pynacl which use PEP 517 and cannot be installed directly

安装 PyNaCl 时出现错误,这是 sshlibrary 的依赖项。该库在构建这些依赖项期间使用了一些本机依赖项和错误引发。

我使用以下 Dockerfile:

FROM alpine

RUN set -eux; \
    apk add --no-cache --virtual .robot-builddeps \
    gcc \
    python3-dev \
    libc-dev \
    openssl-dev \
    make \
    libffi-dev; \
    pip3 install robotframework-sshlibrary

然后我运行:

docker build ./

但是当我从命令行手动安装它时,一切都很好。

docker run -it --rm alpine sh
/ # apk add --no-cache --virtual .robot-builddeps \
    gcc \
    python3-dev \
    libc-dev \
    openssl-dev \
    make \
    libffi-dev; \
    pip3 install robotframework-sshlibrary

不确定问题来自 docker 或 pynacl 大楼。错误似乎与访问权限有关,但我在容器内的命令是使用默认用户 root 运行的。我在我的 Dockerfile 中添加了一些 ls -la 和 id 来检查访问权限,一切看起来都不错。

我的主机系统是带有 Linux 4.19.0-8-amd64 的 debian 10.7,docker 是 20.10.2

4

0 回答 0