Installation of robotframework-sshlibrary within docker image based on alpine

497 Views Asked by At

I'm trying to build a docker image with robotframework-sshlibrary based on alpine and I got a mysterious error message:

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

Error raise during installation of PyNaCl which which is a dependency for sshlibrary. This library use some native dependencies and error raise during the building of those dependencies.

I use following 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

Then I run:

docker build ./

But when I install this by hand from command line all work perfectly.

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

Not sure where problem come from docker or pynacl building. Error seems related to access right but my command inside container is run with default user which is root. I have added to my Dockerfile some ls -la and id to check access right and all looks good.

My host system is debian 10.7 with Linux 4.19.0-8-amd64 and docker is 20.10.2

0

There are 0 best solutions below