forked from cristianrozas/nginx-ldap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
58 lines (52 loc) · 1.74 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FROM debian:jessie
MAINTAINER Henrik Sachse <[email protected]>
ENV NGINX_VERSION release-1.11.13
# Use jessie-backports for openssl >= 1.0.2
# This is required by nginx-auth-ldap when ssl_check_cert is turned on.
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \
&& echo 'deb http://ftp.debian.org/debian/ jessie-backports main' > /etc/apt/sources.list.d/backports.list \
&& apt-get update \
&& apt-get install -t jessie-backports -y \
ca-certificates \
git \
gcc \
make \
libpcre3-dev \
zlib1g-dev \
libldap2-dev \
libssl-dev \
wget
# See http://wiki.nginx.org/InstallOptions
RUN mkdir /var/log/nginx \
&& mkdir /etc/nginx \
&& cd ~ \
&& git clone https://github.com/gouzhuang/nginx-auth-ldap.git \
&& git clone https://github.com/nginx/nginx.git \
&& cd ~/nginx \
&& git checkout tags/${NGINX_VERSION} \
&& ./auto/configure \
--add-module=/root/nginx-auth-ldap \
--with-http_ssl_module \
--conf-path=/etc/nginx/nginx.conf \
--sbin-path=/usr/sbin/nginx \
--pid-path=/var/log/nginx/nginx.pid \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--with-stream \
--with-stream_ssl_module \
--with-file-aio \
--with-threads \
--with-http_gunzip_module \
--with-http_gzip_static_module \
--with-http_v2_module \
--with-http_auth_request_module \
&& make install \
&& cd .. \
&& rm -rf nginx-auth-ldap \
&& rm -rf nginx \
&& wget -O /tmp/dockerize.tar.gz https://github.com/jwilder/dockerize/releases/download/v0.2.0/dockerize-linux-amd64-v0.2.0.tar.gz \
&& tar -C /usr/local/bin -xzvf /tmp/dockerize.tar.gz \
&& rm -rf /tmp/dockerize.tar.gz
EXPOSE 80 443
COPY run.sh /run.sh
CMD ["/run.sh"]