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

This commit is contained in:
Vladimir Homutov 2017-12-22 19:14:10 +03:00
parent cdc0abff91
commit 1262eaf8a3
2 changed files with 24 additions and 0 deletions

16
Dockerfile Normal file
View File

@ -0,0 +1,16 @@
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"]

View File

@ -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: 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.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. - **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. - **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. - **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.