Closed felixtech-msp closed 2 years ago
Hello @felixtech-msp I see you are installing on root folder. Are you running it on Docker? Which image? How did you install python? I would like to have more details to reproduce your error.
Hello @uilianries! I am using Docker and this is my Dockerfile:
FROM python:3.10
RUN apt-get update && apt-get install -y libsasl2-dev libldap2-dev libssl-dev && apt-get clean
RUN pip install conan
RUN pip install python-ldap
RUN pip install conan_ldap_authentication
CMD ["conan_server"]
The error occurs during build of this Dockerfile. The OS of the Docker host is Ubuntu 20.04.3 LTS; Docker version 20.10.12, build e91ed57.
When I just don't install the plugin and instead copying the .py file into the right location the plugin works.
It works for me, but I'm using the official Conan docker images instead. I suggest you doing the same, do you don't need to maintain a new one:
FROM conanio/conan_server
RUN apk add gcc openldap-dev musl-dev
RUN pip install conan_ldap_authentication
The thing is, conan_ldap_authentication
uses python-ldap
pip package, which is a wrapper for openldap C libraries, however, it's not installed by default.
You don't need to add CMD
statement here, because the official image already does it. It's code is listed here: https://github.com/conan-io/conan-docker-tools/blob/master/legacy/conan_server/Dockerfile
With exactly your Dockerfile exactly the same issue happens again.
@felixtech-msp please, update you copy, I provided a small hotfix. As it runs as root, it seems like need to force that file copy.
I also added a Docker recipe in the repository, which you can use for your projects.
Closing this issue now. Please, re-open in case it does not work.
The new package has a missing file:
Collecting conan_ldap_authentication
Downloading https://files.pythonhosted.org/packages/74/cf/4af6ac2d036d65ebfe4481198089414473f4b01f4fa2527b52069a3563f1/conan_ldap_authentication-0.4.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-w65df3tn/conan-ldap-authentication/setup.py", line 131, in <module>
install_requires=Requirements.get(),
File "/tmp/pip-install-w65df3tn/conan-ldap-authentication/setup.py", line 34, in get
with open(Requirements.__requirements_path) as req_file:
File "/usr/local/lib/python3.7/codecs.py", line 898, in open
file = builtins.open(filename, mode, buffering)
FileNotFoundError: [Errno 2] No such file or directory: 'conan_ldap/requirements.txt'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-w65df3tn/conan-ldap-authentication/
You are using pip version 19.0.1, however version 22.0.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
The command '/bin/sh -c pip install conan_ldap_authentication' returned a non-zero code: 1
Python Version: 3.10 Installed packages: libsasl2-dev libldap2-dev libssl-dev Installed Python packages: conan python-ldap
When I install this plugin to an already existing Conan server the installation fails with this message:
This makes no sense because it says the plugin file is not there but why should it be there when I just want to install the plugin??