diff --git a/docker/Dockerfile b/docker/Dockerfile index e4882f9..717e16e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -86,6 +86,11 @@ RUN pip3 install j2cli # Install Python PAM support RUN apt-get install -y libpam-python pamtester +# NOTE: Python2 needed for custom PAM module +RUN apt-get install -y python python-dev +RUN wget https://bootstrap.pypa.io/pip/2.7/get-pip.py +RUN python2 get-pip.py +RUN pip install requests # Copy scripts and templates COPY docker-entrypoint.sh files/irods_login.sh \ diff --git a/docker/templates/pam_sodar.py.j2 b/docker/templates/pam_sodar.py.j2 index a1f1578..8e97310 100644 --- a/docker/templates/pam_sodar.py.j2 +++ b/docker/templates/pam_sodar.py.j2 @@ -5,6 +5,9 @@ LDAP/AD server is not available. __author__ = 'Mikko Nieminen' import os +import site +# HACK to allow libpam-python to find 3rd party packages +site.addsitedir('/usr/local/lib/python2.7/site-packages') import requests