Commit 1262eaf8 authored by Vladimir Homutov's avatar Vladimir Homutov
Browse files

Added Dockerfile for nginx-ldap-auth-daemon.py.

parent cdc0abff
Loading
Loading
Loading
Loading

Dockerfile

0 → 100644
+16 −0
Original line number Diff line number Diff line
FROM python:2-alpine

COPY nginx-ldap-auth-daemon.py /usr/src/app/

WORKDIR /usr/src/app/

# Install required software
RUN \
    apk --no-cache add openldap-dev && \
    apk --no-cache add --virtual build-dependencies build-base && \
    pip install python-ldap && \
    apk del build-dependencies

EXPOSE 8888

CMD ["python", "/usr/src/app/nginx-ldap-auth-daemon.py", "--host", "0.0.0.0", "--port", "8888"]
+8 −0
Original line number Diff line number Diff line
@@ -38,6 +38,14 @@ To install and configure the reference implementation, perform the following ste
1. Copy the following files from your repository clone to the indicated hosts:
    - **nginx-ldap-auth.conf** – NGINX Plus configuration file, which contains the minimal set of directives for testing the reference implementation. Install on the NGINX Plus host (in the **/etc/nginx/conf.d** directory if using the conventional configuration scheme). To avoid configuration conflicts, remember to move or rename any default configuration files installed with NGINX Plus.
    - **nginx-ldap-auth-daemon.py** – Python code for the ldap-auth daemon. Install on the host of your choice.

      Alternatively, use provided Dockerfile to build Docker image:

      ```
      docker build -t nginx-ldap-auth-daemon .
      docker run nginx-ldap-auth-daemon
     ```

    - **nginx-ldap-auth-daemon-ctl.sh** – Sample shell script for starting and stopping the daemon. Install on the same host as the ldap-auth daemon.
    - **backend-sample-app.py** – Python code for the daemon that during testing stands in for a real back-end application server. Install on the host of your choice.