Skip to content

Commit

Permalink
Merge pull request #45 from marisbahtins/master
Browse files Browse the repository at this point in the history
Set LDAP protocol as env parameter. Default value: ldap.
  • Loading branch information
SachinKSingh28 authored Nov 15, 2017
2 parents a73251f + 3d068e8 commit b1e8281
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM ubuntu:14.04
MAINTAINER Robert Northard, <robert.a.northard>

ENV NGINX_VERSION 1.8.0

ENV LDAP_PROTOCOL ldap
############## nginx setup ##############

RUN apt-get update \
Expand Down Expand Up @@ -32,11 +32,11 @@ RUN mkdir /var/log/nginx \
--add-module=/root/nginx-auth-ldap \
--with-http_ssl_module \
--with-debug \
--conf-path=/etc/nginx/nginx.conf \
--sbin-path=/usr/sbin/nginx \
--pid-path=/var/run/nginx.pid \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--conf-path=/etc/nginx/nginx.conf \
--sbin-path=/usr/sbin/nginx \
--pid-path=/var/run/nginx.pid \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
&& make install \
&& cd .. \
&& rm -rf nginx-auth-ldap \
Expand All @@ -55,4 +55,4 @@ COPY resources/scripts/ /resources/scripts/
COPY templates/configuration/ /templates/configuration/
RUN chmod +x /resources/scripts/*

CMD ["/resources/scripts/entrypoint.sh"]
CMD ["/resources/scripts/entrypoint.sh"]
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,24 @@ adop-nginx provides Nginx with LDAP support. Nginx is a high performance reverse
$ docker run --name <your-container-name> -dt \
-v /resources/configuration/:/etc/nginx/:ro \
-v /resources/release_note:/usr/share/nginx/html/:ro \
-v /var/log:/var/log
-v /var/log:/var/log
-p 443:443 \
-p 80:80 \
accenture/adop-nginx:VERSION

## Configuration

The nginx configuration is externalised and stored the 'resources' directory.

Runtime configuration can be provided using environment variables:

* LDAP_SERVER, the LDPA URI, i.e. ldap-host:389
* LDAP_PROTOCOL, allowed values ldap(default)/ldaps
* LDAP_USERNAME, the LDAP BASE_DN
* LDAP_PASSWORD, the password to use connecting to LDAP service using the provided username
* LDAP_PASSWORD, the password to use connecting to LDAP service using the provided username
* LDAP_USER_BASE_DN, the LDAP user BASE_DN
* LDAP_GROUP_ATTRIBUTE, LDAP object field attribute the defines group appartenence.
* LDAP_USER_ID_ATTRIBUTE, LDAP object field attribute the defines the user identifier.
* LDAP_GROUP_ATTRIBUTE, LDAP object field attribute the defines group appartenence.
* LDAP_USER_ID_ATTRIBUTE, LDAP object field attribute the defines the user identifier.
* LDAP_USER_OBJECT_CLASS, LDAP user object class

# License
Expand All @@ -49,7 +50,7 @@ Support for older versions (down to 1.6) is provided on a best-effort basis.
# User feedback

## Documentation
Documentation for this image is available in the [Nginx documentation page](http://nginx.org/en/docs/).
Documentation for this image is available in the [Nginx documentation page](http://nginx.org/en/docs/).
Additional documentaion can be found under the [`docker-library/docs` GitHub repo](https://github.com/docker-library/docs). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/docker-library/docs/blob/master/README.md) before attempting a pull request.

## Issues
Expand Down
2 changes: 1 addition & 1 deletion templates/configuration/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ http {
# LDAP Settings
##
ldap_server adop{
url "ldap://###LDAP_SERVER###/###LDAP_USER_BASE_DN###?###LDAP_USER_ID_ATTRIBUTE###?sub?(objectClass=###LDAP_USER_OBJECT_CLASS###)";
url "###LDAP_PROTOCOL###://###LDAP_SERVER###/###LDAP_USER_BASE_DN###?###LDAP_USER_ID_ATTRIBUTE###?sub?(objectClass=###LDAP_USER_OBJECT_CLASS###)";
binddn "###LDAP_USERNAME###";
binddn_passwd "###LDAP_PASSWORD###";
group_attribute ###LDAP_GROUP_ATTRIBUTE###;
Expand Down

0 comments on commit b1e8281

Please sign in to comment.