Reputation: 2099
So. I'm trying to get my Dockerfile to run.
Dockerfile is complicated, and doing things somewhat wrong for Python. The important part, though, is that it was working before I added XMLSec to the dependencies. (via the onelogin [https://github.com/onelogin/python-saml] package)
On our non-Dockerized systems, we run:
apt install -y libxml2-dev libxmlsec1-dev libxmlsec1-openssl pkg-config
and it installs the dependencies. My containerized attempts, however, run into this issue:
Running setup.py install for xmlsec: started
Running setup.py install for xmlsec: finished with status 'error'
Complete output from command /usr/local/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-wd6h548m/xmlsec/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ufxw9hor/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
package init file 'src/xmlsec/__init__.py' not found (or not a regular file)
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/xmlsec
copying src/xmlsec/py.typed -> build/lib.linux-x86_64-3.6/xmlsec
copying src/xmlsec/constants.pyi -> build/lib.linux-x86_64-3.6/xmlsec
copying src/xmlsec/template.pyi -> build/lib.linux-x86_64-3.6/xmlsec
copying src/xmlsec/__init__.pyi -> build/lib.linux-x86_64-3.6/xmlsec
copying src/xmlsec/tree.pyi -> build/lib.linux-x86_64-3.6/xmlsec
running build_ext
error: Unable to invoke pkg-config.
The solution seems to be to use the XMLSec library as a compiled Wheel. (Per something I read in the XMLSec github) I can't find any documentation on how to add this compiled wheel into an executable location within the container via the Dockerfile.
I've done quite a bit of research on this, and can't find sample code or the exact answer. I it may be obvious, but I'm missing core knowledge.
Upvotes: 1
Views: 577